What is Linux?
Linux is a UNIX® clone OS
based on MINIX,
created in 1991 by Linus Torvalds from the University of
Helsinki. Torvalds controls all changes and releases of the
Linux kernel.
For close to three decades, Linux has been one of the most
commonly used and most reliable OSs for servers in the market,
no matter what paid third-party reports that are plaguing the
internet indicate.
Most Linux distributions include a collection of programs
that run on the Linux kernel like X, KDE, GNOME, Cinnamon,
Xfce, LXQt, Mate or other desktop environments as well as
LibreOffice and other office or home utilities. Under the Linux
name, you can get RHEL (paid subscription, enterprise
licensing), Fedora (originally based on RHEL), Oracle (based on
RHEL), Debian, Ubuntu (based on Debian), Mint (based on
Ubuntu), openSUSE (forked from SUSE), Slackware (based on the
now-defunct Softlanding Linux System), Arch Linux (inspired by
Slackware) and many others. For more information on
distros and how popular they are, visit the DisroWatch
website.
When Linux became popular (c. 1995-99), you could buy disks
for any distribution (distro) from the developers or
third-party vendors. Nowadays you would most likely download
the distro of your choice as an .ISO and copy
(dd) it to USB drive (/dev/sdb1) making sure
you have selected the correct sdbx.
dd if=linux_image.iso of=/dev/sdb1
Installing Linux:
Before trying to install Linux, get a full inventory of what
your hardware. In the past, you might have had to help the
installer recognize the hardware and/or fully rewrite the
configuration (config) files. Nowadays installer
shipped with the distro takes care of most the
configuration.
Boot from the USB drive and sit back. The only thing you
would have to decide is if you want to format the whole drive
or share it with another OS as well as entering your
credentials (root access) and network information
(802.11 if needed).
Depending on the distro, you might need to update
your installation right away. If the distro is based
on Debian and it has apt as in the case of Ubuntu and
its derivatives, you might want to run the following commands
on the console as superuser (sudo -i) for
root access.
apt update && # to update `apt` repo list
apt upgrade -y && # to upgrade local packages
apt autoclean -y && # to clean leftover packages
apt autoremove -y && # to remove leftover packages
apt purge -y && # to purge old packages
reboot -n # to reboot machine now
The latter runs multiple commands as a single statement —
one after another using the && (and)
operator and then reboot without confirmation using the
-y (yes) attribute. Of course if you do not
need to reboot exclude the last && operator and
the reboot -n command. I would recommend doing the
latter on a daily basis to make sure your system has the most
up-to-date packages and to avoid security risks.
You can also install packages using apt calling the
correct package name.
apt install <package_name>
apt install -y build-essential # compiler collection from GNU
apt install -y ddgr # DuckDuckGo via command line
apt install -y dosbox # DOS emulator for games and applications
apt install -y git # version control system
apt install -y lynx # text-only web browser
apt install -y mc # terminal file manager
apt install -y nano # command line text editor
apt install -y nasm # assembly language
apt install -y python3 # language that we should all learn
apt install -y python3-pip # package manager for python3
apt install -y screenfetch # system information tool
apt install -y sqlite3 # relational database with no GUI
apt install -y tidy # utility to tidy up HTML code
apt install -y whois # access to the `whois` database (domain registration)
If you do not want the system to ask you for confirmation,
you can include -y (yes) attribute, before
the name of the package.
apt install -y <package_name>
apt install -y build-essential
If you are interested in installing multiple packages at the
same time, you would also need to use the double ampersand
operator (&&) after each call. Note the latter can
be written as a single statement.
apt install -y build-essential &&
apt install -y ddgr &&
apt install -y dosbox &&
apt install -y git &&
apt install -y lynx &&
apt install -y mc &&
apt install -y nano &&
apt install -y nasm &&
apt install -y python3 &&
apt install -y python3-pip &&
apt install -y screenfetch &&
apt install -y sqlite3 &&
apt install -y tidy &&
apt install -y whois
Aside from apt, another common package manager that
most distros include is Flatpak (flatpak),
which can install applications at the user level without the
need of root access.
flatpak install <repository> <package_name>
flatpak install flathub com.vscodium.codium # Visual Studio clone
To update Flatpak packages, the request is similar to that
of apt.
flatpak update -y
Flatpak also provides a means to repair damaged
packages.
flatpak repair
Flatpak also provides a list of its packages installed in
your machine.
flatpak list
The latter two commands other than getting the list of
Flatpak packages can be added to the apt script.
apt update && # to update `apt` repo list
apt upgrade -y && # to upgrade local packages
apt autoclean -y && # to clean leftover packages
apt autoremove -y && # to remove leftover packages
apt purge -y && # to purge old packages
flatpak update -y && # to update Flatpak repo list
flatpak repair && # to repair Flatpak packages
reboot -n # to reboot machine now
Aside from Flatpak and apt, another common package
manager that most distros can use is snap,
which is developed by Canonical.
snap install <package_name>
snap install bottom # memory management
Note that snap might be blocked by default so you
might need to follow the proper steps provided for the
distro. For example, for Mint Linux, you would need to
rename /etc/apt/preferences.d/nosnap.pref
or move it to another location using sudo -i.
mv /etc/apt/preferences.d/nosnap.pref /etc/apt/preferences.d/nosnap.pref.old
Once snap is no longer blocked, you can install
it.
apt update && # to update repository list
apt install -y snapd # to install snap
For documentation on how to use apt, snap
or other program, refer to the man (manual)
page for each program.
man man # manual for program `man`
Note that I started playing with Red Hat Linux 5.2 (11/1998)
and then 6.0 with GNOME (10/1999), but most of my experience
since 2011 has been with Ubuntu distros, developed by
Canonical and based on Debian. Therefore most of what I cover
in this page is related to Ubuntu distros. I used to
like KDE (both on Linux and FreeBSD),
but I no longer do after version 3 (sorry, but no more Kubuntu
for me). I have also played with Unity (Ubuntu), GNOME (Ubuntu
GNOME), LXQt (Lubuntu), Cinnamon (Mint & Ubuntu Cinnamon) and
now Xcfe (Xubuntu).