What Linux is and what it does on a server
This lesson is open to everyone. The other lessons open with a package: sign in or sign up, then choose a package.
Key points
- The kernel is the core of the system: it manages the processor, memory, disks and network card. "Linux" is, strictly speaking, the name of the kernel.
- A distribution = kernel + commands + package manager + installer. Ubuntu, Debian and Linux Mint are distributions.
- This course uses Ubuntu Server: software is installed with
apt, packages are.debfiles, and a new LTS release comes out every two years. - A server usually runs without a graphical interface and is managed remotely from a terminal over SSH.
uname -rshows the kernel version,cat /etc/os-releaseshows the distribution, andhostnamectlshows the server name and a general summary.
Why Linux?
Most of the websites you open, banking systems and cloud services run on Linux servers. Devices such as routers, firewalls and camera recorders (NVR) often have Linux inside too.
The reasons are simple:
- Free and open source: you do not pay a licence for every server, and anyone can read the code.
- Stable: a well-built server runs for months without a reboot.
- Managed from a terminal: the same commands work on 1 server or on 100, and you can turn them into a script.
This is where a system administrator's daily work begins: connecting to a server, getting to know it, and managing users, disks, the network and services.
Kernel and distribution
In 1991 Linus Torvalds started writing a new operating system kernel and called it Linux. A kernel on its own is not a ready system for a user: it needs commands, libraries, an installer and a way to install software.
A project that bundles all of this together and ships it as a ready system is called a distribution.
Why Ubuntu Server?
There are hundreds of distributions. In this course we use Ubuntu Server because:
- it is one of the distributions you meet most often on servers and in cloud services;
- it is free and comes with long-term support (LTS);
- software is installed with one command:
apt install; - there is plenty of documentation and help for it.
Ubuntu is built on Debian, so the commands are almost the same on Debian too.
Server and desktop
A home computer has windows, a mouse and a browser. A server usually has none of these:
- No graphical interface is installed: so it does not waste memory and CPU, and does not open an extra door for attacks.
- It is managed remotely: the administrator connects from their own computer over SSH and types commands in a terminal.
- It runs non-stop: updates are done at planned times, and reboots are rare.
Connecting over SSH looks like this (we cover it in detail in a separate lesson):
C:\Users\ali> ssh [email protected] ali@srv-web01:~$
The last line is the prompt: ali is the user name, srv-web01 the server name, ~ the home directory, and $ shows a regular user. If the prompt ends with #, you are working as root (the chief administrator).
Getting to know the server: the first three commands
When you connect to a new server, the first question is: "What system is this?"
ali@srv-web01:~$ uname -r 6.8.0-48-generic ali@srv-web01:~$ cat /etc/os-release PRETTY_NAME="Ubuntu 24.04.1 LTS" NAME="Ubuntu" VERSION_ID="24.04" ID=ubuntu ID_LIKE=debian ali@srv-web01:~$ hostnamectl Static hostname: srv-web01 Operating System: Ubuntu 24.04.1 LTS Kernel: Linux 6.8.0-48-generic Architecture: x86-64
uname -rshows only the kernel version.- The
/etc/os-releasefile holds the distribution name and version. The lineID_LIKE=debiansays this system belongs to the Debian family. hostnamectlshows the server name, the system, the kernel and the architecture in one place. (The real output is longer; the main lines are shown here.)
What does LTS mean?
Some Ubuntu releases are called LTS (Long Term Support) and come out every two years: 22.04, 24.04 and so on. An LTS version receives security updates for a long time, which is why servers use LTS.
The rule is simple: always install a version with long-term support on a server, and upgrade a version before its support ends.
Check yourself
5 questions · answers are shown instantly · 3 correct answers complete the lesson
1What is "Linux", strictly speaking, the name of?
2Which Ubuntu version is the right one for a server?
3Which package manager installs software on Ubuntu?
apt: sudo apt install nginx.4The prompt looks like root@srv-web01:~#. What does it mean?
# means root, $ means a regular user.5Where can you see the distribution name and version?
uname -r gives only the kernel version; the distribution is in /etc/os-release.Comments
Sign in to comment.