andy@server:~$ learn ubuntu
0 of 12 done

Lesson 1 of 12 · Finding your way

The prompt, and where you are

Every mistake beginners make on a server starts with running the right command in the wrong directory.

Your prompt tells you four things: who you are, which machine you're on, where you are, and whether you're root. In andy@server:~$ the part before the @ is your username, the part after it is the hostname, the ~ is your current directory, and the $ means you are an ordinary user. If that last character is a #, you are root and every command is unguarded.

Linux has one filesystem tree starting at / (root). There are no drive letters. A path starting with / is absolute — it means the same thing from anywhere. A path not starting with / is relative to where you currently are. Two dots (..) mean the directory above; one dot (.) means here; ~ is shorthand for your home directory, /home/andy.

pwdprint working directory — where am I?
lslist what's in this directory
cd /etcchange to an absolute path
cd ..go up one level
cdgo home (same as cd ~)
The terminal below is a simulated Ubuntu 26.04 server. Nothing you type can break anything, so experiment freely. Type help to see which commands it understands.

Run these

Find out which directory you're in.
Move to /etc and list what's there.
Return to your home directory.
andy@server·simulated shell
Simulated Ubuntu 26.04.1 LTS (resolute) — nothing here can break.
Type help for the command list.
andy@server:~$

Check yourself

You see andy@server:/var/log# — what does the # tell you?

You're in /home/andy and type cd nginx. What happens?

Run the commands above to finish this lesson.