Skip to main content
The basic Linux commands every server beginner needs are pwd, ls and cd to move around, cp, mv, rm and mkdir to manage files, cat, less and tail to read them, sudo to run admin tasks, apt or dnf to install software, and df, free and top to check resources. They work the same on Ubuntu, Debian, AlmaLinux and Rocky Linux, except the package manager.

Before you start

  • Connect to your server with SSH.
  • Log in as a normal user with sudo rights where you can. Commands that change the system start with sudo; if you are logged in as root, you can leave sudo out.
  • Every command has a manual. Type man ls or ls --help to see all options. Press q to leave a manual page.

How to move around the file system

Linux stores everything in one tree that starts at / (the root directory). Your home directory is /home/<user> (for root it is /root), shortened to ~.
Expected output of pwd:
Press Tab to complete file and command names, and the up arrow to repeat earlier commands. history lists everything you typed recently.

How to create, copy, move and delete files

Linux has no recycle bin. rm deletes immediately, and rm -rf deletes without asking. Check the path with ls first, never run rm -rf on / or a path built from an empty variable, and take a backup or snapshot before large clean-ups. Add -i (rm -ri folder) to confirm each file.

How to read files and logs

/var/log/syslog and /var/log/auth.log exist on Ubuntu and Debian when rsyslog is installed. AlmaLinux and Rocky Linux use /var/log/messages and /var/log/secure. journalctl works on all of them; see how to read logs with journalctl. To edit a file, use nano (easiest) or vim: see how to edit files with nano and vim.

How to install and update software

The package manager downloads software from your distribution’s repositories.
More detail: how to update Linux packages.

How to check resources: disk, memory and CPU

Example output of free -h:
Look at the available column: that is what new programs can still use.

How to manage processes and services

See how to manage services with systemctl and how to kill a process.

How to manage users and permissions

See how to create a sudo user and file permissions explained.

Networking and transfer commands

How to check it worked

Run these three commands. If each prints a result without an error, your shell, sudo and package manager all work:
sudo whoami prints root.

Frequently asked questions

Is the Linux terminal case-sensitive?

Yes. File.txt and file.txt are two different files, and LS is not the same command as ls.

How do I stop a command that is running?

Press Ctrl+C. If a full-screen program such as less, top or man is open, press q.

Why do I get “Permission denied”?

You are trying to change something that belongs to another user or to root. Put sudo in front of the command, or check the file owner with ls -l. See file permissions explained.

How do I log out of the server?

Type exit or press Ctrl+D. Running programs started in that session stop unless you use tmux or screen; see keep SSH sessions running.

How do I clear the screen?

Type clear or press Ctrl+L.

VPS and dedicated server guides

Every server guide in one place.

Connect with SSH

Log in to your Linux server.

Find files and text

Use find and grep.

Edit files with nano and vim

Change config files safely.

First 10 things on a new VPS

Set up a new server properly.

Checked against the official GNU Coreutils manual and the Ubuntu Server documentation on 4 November 2026; commands tested on Ubuntu 24.04 LTS. Commands can differ on other distributions or releases.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: November 2026