Every Linux session starts with the same three questions: who am I, where am I, and what is around me? The commands below answer them, and none of them changes anything on the system, so you can run them safely.
Part of the Linux for Beginners series. This article is the written version of lesson 1 of the Bigland Network video course. All outputs were captured on AlmaLinux 9.8. Your own names, folders and host name will differ, so the examples use
your-userandyour-host.
Watch lesson 1 as a video or open it on YouTube. The written lesson below follows the same steps and the same sample data.
Contents
- 1. whoami: who am I?
- 2. pwd: where am I?
- 3. ls: what is around me?
- 4. cd: moving around the tree
- 5. uname -a: describe the system
- 6. cat: read a file
- 7. Common mistakes
- 8. Practice
1. whoami: who am I?
whoami prints the account you are logged in as. Some commands need administrator rights, so check first.
$ whoami
your-user
2. pwd: where am I?
pwd means print working directory. It prints the folder you are in right now. Linux has no drive letters such as C or D. Everything starts from one top folder, the root, written as a single slash /. Your home folder is written with a tilde, ~, and it is where you start when you log in.
$ pwd
/home/your-user
3. ls: what is around me?
ls lists the files and folders in the current folder. Two options are worth knowing:
ls -lshows a long list with the owner, size and date of each item.ls -aalso shows hidden files, the ones whose names start with a dot, such as.bashrc.
Combine them with ls -la. The owner column in your own output shows your account name.
$ ls /var
adm cache crash db empty ftp games kerberos lib local lock log mail nis opt preserve run spool tmp yp
4. cd: moving around the tree
cd means change directory. It moves you into another folder:
| Command | What it does |
|---|---|
cd /etc |
Goes to the folder /etc, starting from the root. |
cd .. |
Goes one level up, to the parent folder. |
cd ~ or just cd |
Goes back to your home folder. |
Linux is case sensitive, so Documents and documents are two different folders. After each cd, check where you are with pwd.
$ cd /etc && pwd
/etc
$ cd ~ && pwd
/home/your-user
$ cd /etc && cd .. && pwd
/
Each line above runs as its own command, so every one starts from your home folder.
5. uname -a: describe the system
uname -a prints the system information on one line: the kernel name, the kernel version, the host name and the machine type. Plain uname prints only the kernel name.
$ uname -a
Linux your-host 5.14.0-687.66.2.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 6 16:20:31 EST 2026 x86_64 x86_64 x86_64 GNU/Linux
$ uname
Linux
6. cat: read a file
cat prints the content of a file. A small file that names the distribution and its version is /etc/redhat-release:
$ cat /etc/redhat-release
AlmaLinux release 9.8 (Olive Jaguar)
AlmaLinux belongs to the Red Hat family, so the commands in this series work on it the same way.
7. Common mistakes
- Forgetting that Linux is case sensitive.
cd Etcis not the same folder ascd /etc. - Writing
cdwithout a space.cd/etcis read as one unknown word, so nothing moves. - Expecting a read command to change something. Every command in this lesson only reads information.
8. Practice
- Run
cd ~, thenpwd. Which folder are you in? - List the folder
/varwithls. Name two folders you see. - Run
unamewith no option. What does it print?
Answers: (1) your home folder, the one cd ~ brings you back to. (2) For example log, cache or spool. (3) Linux. Add -a to see every detail.
Next, in the series: reading files with cat, less, head, tail and grep.
More tutorials like this
Linux Permission Denied Error: Causes and How to Fix It (chmod, namei, id)
Fix the Linux Permission denied error: read ls -l, namei -l and id, then add only the permission letter you need with chmod. Real…
systemd Basics: Manage Services and Read Logs with systemctl and journalctl
Start, stop and enable services with systemctl, read logs with journalctl, write your own service and timer, and troubleshoot a service that will not…
Bash Scripting for Beginners: Variables, Loops, Functions and Exit Codes
Learn Bash scripting from your first script to a safe backup script: variables, quoting, loops, functions, exit codes and set -euo pipefail, with real…


