Module 1: First steps
Find your way around: pwd, ls and cd
Everything on Linux lives in one tree of folders, and your terminal is always somewhere in it. These three commands tell you where you are, what's there, and how to move.
● Runs 100% in your browser. Nothing here can harm a real system.
Step 1 of 8
Where are you?
pwd prints the folder you're in, as a full path from the root of the tree, /.
Your task
Print the folder you're in.
guest@ohsudo: ~ — Ubuntu 24.04
Starting the terminal…
What you'll practice
- Where are you?.
pwdprints the folder you're in, as a full path from the root of the tree,/. - What's here?.
lslists what's in the current folder. - Hidden files. A name starting with a dot is hidden from a plain
ls. Configuration files are often hidden.-ashows all of them, and adding-lshows details such as permissions and sizes. - Go into a folder.
cdchanges the folder you're in. Your prompt shows where you ended up. - Go back up.
..always means the folder above this one. - Jump anywhere. A path starting with
/is absolute: it works from anywhere. Logs live in/var/logon nearly every Linux system. - The system log. Debian and Ubuntu write general system messages to a file called
syslog. RHEL, Rocky and AlmaLinux write general system messages to a file calledmessages, notsyslogas on Debian and Ubuntu. - Go home.
~means your home folder, and a plaincdtakes you there too.