You will do this on every machine you ever log into. The goal is to stop guessing and start asking.
1. Where am I, and what is here
pwd
ls
ls -lals alone hides two things that matter: entries beginning with a dot, and everything about them. -l gives one per line with permissions, owner, size and modification time; -a includes the dotfiles. You will type ls -la for the rest of your life.
Verify
2. Move without typing full paths
cd /var/log
pwd
cd -
pwdcd - returns to the previous directory, which is far more useful than it sounds when you are bouncing between a config directory and a log directory.
Verify
3. Ask what a thing actually is
file /etc/hostname
file /bin/ls
file /var/logThree different answers: text, an executable, a directory. On a strange machine, file saves you from cat-ing a binary and filling your terminal with noise.
Verify
4. Find out where a command lives
which ls
command -v systemctl
type cdtype is the one that tells the truth: it distinguishes a binary from a shell builtin from an alias. cd is a builtin, which is why which cd often finds nothing.
Verify
5. See how much room you have
df -h
du -sh /var/logdf reports per-filesystem, du measures a directory tree. The two disagreeing is a normal state of affairs and the subject of a later lab.
Verify
Where this goes next
You can orient yourself. Next: reading files without opening an editor, which is most of what you do on a server.