ubuntu, updated
Stuck? Where to get help
Built-in help (man, --help, apropos), quick example sites, and where to look when something is broken.
On the server itself
You almost never need the internet to find out how a command works.
| What | Command |
|---|---|
| Short help of a command | ls --help |
| Full manual | man ls |
| Search inside a man page | inside man: /word, then n for next, q to quit |
| I don’t know the command name | apropos partition (same as man -k) |
| What is this command? | type ll, which nano |
| One-line description | whatis lsblk |
Help for shell built-ins (cd, export…) | help cd |
| Package documentation | ls /usr/share/doc/PACKAGE |
Man pages have sections. man 5 crontab shows the file format, man 1 crontab the command. Section 8 is admin commands.
Examples instead of manuals
Man pages explain every option but rarely show a simple example. For that:
- tldr: community cheat sheets, e.g.
tldr tar. Install a client, for examplesudo apt install tealdeeron newer releases. - cheat.sh: no install needed:
curl cheat.sh/tar - explainshell.com: paste a long command and see what every part does.
When something is broken
The error is almost always in a log. Start here:
systemctl --failed # which services are down?
systemctl status SERVICE # state plus the last log lines
journalctl -u SERVICE -n 50 # last 50 log lines of a service
journalctl -p err -b # all errors since boot
dmesg -T | tail -30 # kernel: disks, drivers, hardware
More in Where are the logs? and Searching logs.
Online
- Ubuntu Server docs: documentation.ubuntu.com/server (official, good how-tos)
- Ask Ubuntu: askubuntu.com (Q&A, search before asking)
- Ubuntu manpages online: manpages.ubuntu.com (pick your release)
- Arch Wiki: wiki.archlinux.org (not Ubuntu, but the best general Linux explanations)
Tip: When you search for an error, paste the exact message in quotes and add your Ubuntu version (
lsb_release -aorcat /etc/os-release).