Server Administration

Linux for Beginners: Core Concepts and Essential Server Commands

By NileVPS Team · Published · 4 min read

اقرأ المقال بالعربي

Most of the internet runs on Linux, and sooner or later anyone who rents a VPS meets its command line. It can look intimidating at first: a blinking cursor, no icons, no undo button. In reality you only need a small set of concepts and a few dozen commands to manage a server confidently. This guide covers those foundations, from how the filesystem is organized to installing software and checking that services are running.

Core concepts

The kernel, the distribution and the shell

The kernel is the core of the operating system: it manages memory, processes, disks and the network. A distribution such as Ubuntu, Debian or AlmaLinux packages the kernel with tools, a package manager and default settings. The shell, usually bash, is the program that reads the commands you type and runs them.

Everything is a file

Linux represents most things as files: regular documents, directories, devices under /dev, and even live system information under /proc. Configuration is stored in plain-text files, which is why editing text is such a big part of server work.

Users and root

Every process runs as a user. The root user can do anything, including breaking the system. Good practice is to log in as a normal user and run administrative commands with sudo, which grants root privileges for that single command.

Connecting to your server

You connect to a Linux VPS over SSH from a terminal (Windows 10 and 11 include an SSH client in PowerShell):

ssh username@your-server-ip

Once connected, you see a prompt such as user@server:~$. The ~ means your home directory, and $ means a normal user (root's prompt usually ends with #).

The filesystem layout

Linux has a single tree that starts at / (the root directory). The most important locations:

PathWhat lives there
/etcSystem and application configuration files
/homeHome directories of normal users
/rootHome directory of the root user
/varVariable data: logs in /var/log, websites often in /var/www
/usrInstalled programs and libraries
/tmpTemporary files, cleared on reboot on many systems
/dev, /procDevices and live kernel information

Essential commands

Moving around

pwd            # print the current directory
ls -lah        # list files with details, including hidden ones
cd /var/log    # change directory
cd ..          # go up one level
cd ~           # go to your home directory

Working with files

mkdir projects            # create a directory
touch notes.txt           # create an empty file
cp file.txt backup.txt    # copy
mv old.txt new.txt        # move or rename
rm file.txt               # delete a file (there is no recycle bin)
rm -r folder              # delete a directory and its contents

Be careful with rm, especially with -r and sudo. Double-check the path before pressing Enter.

Reading and editing text

cat file.txt              # print a whole file
less /var/log/syslog      # scroll through a long file (q to quit)
tail -f /var/log/nginx/error.log   # follow a log live
grep "error" app.log      # search for text
nano /etc/hosts           # edit with a simple editor

nano shows its shortcuts at the bottom: Ctrl+O saves and Ctrl+X exits. Many admins later learn vim, but nano is enough to start.

Installing software

On Ubuntu and Debian:

sudo apt update
sudo apt install nginx

On AlmaLinux and Rocky Linux:

sudo dnf install nginx

Run updates regularly to receive security fixes.

Managing services

Most modern distributions use systemd to start and supervise background services:

sudo systemctl status nginx    # is it running?
sudo systemctl restart nginx   # restart after a config change
sudo systemctl enable nginx    # start automatically at boot
journalctl -u nginx -n 50      # last 50 log lines for the service

Checking resources

df -h       # disk space
free -h     # memory
htop        # live processes (install it if missing)
uptime      # how long the server has been up, and load average

Getting help

Almost every command documents itself. Try man ls for the full manual, or ls --help for a short summary. Press Tab to auto-complete file names and commands, and use the up arrow to recall previous commands. history shows what you ran before.

Habits that prevent disasters

  • Take a snapshot before risky changes such as major upgrades.
  • Copy configuration files before editing: sudo cp nginx.conf nginx.conf.bak.
  • Test configs before reloading, for example sudo nginx -t.
  • Never paste commands you do not understand, especially ones that pipe a download into sudo bash.

Once you are comfortable with these basics, the next step is understanding who can read and change which files. Our guide to Linux file permissions covers exactly that. When you are ready to practice on a real machine, you can deploy a Linux VPS in a few minutes.

FAQ

Do I need to learn Linux to run a VPS?

Not necessarily, since control panels can handle many tasks. However, basic command-line skills make troubleshooting far easier, and they are useful even when you use a panel.

What is the difference between root and sudo?

Root is the all-powerful administrator account. sudo lets a normal user run a single command with root privileges, which reduces mistakes and leaves a log of administrative actions.

Can I undo a deleted file in Linux?

Generally no. rm removes files immediately without a recycle bin. That is why regular backups and snapshots are essential on any server.

Related guides