Linux for Beginners: Where Am I? whoami, pwd, ls, cd, uname and cat Explained

Linux 3 min readUpdated Nov 25, 2026
7 views0 comments

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-user and your-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?

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 -l shows a long list with the owner, size and date of each item.
  • ls -a also 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 Etc is not the same folder as cd /etc.
  • Writing cd without a space. cd/etc is 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

  1. Run cd ~, then pwd. Which folder are you in?
  2. List the folder /var with ls. Name two folders you see.
  3. Run uname with 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.

Did you find this helpful?Tap the heart to let us know. It takes one second and no account.

More tutorials like this

Leave a Comment

Your email address will not be published. Required fields are marked *

Bigland Network IT

Practical tutorials for people who run, build and fix things: operating systems, databases, development, networking and security.

Topics

More

Site

© 2026 Bigland Network. All rights reserved.Always test commands on a non-production system first.
Scroll to Top