STATUS
This is still a work in progress
Introduction
Iāve started following the Linux Upskill Challenge to sharpen my Linux knowledge and hands-on skills. Itās a series of 21 lessons designed to be completed daily, but Iāll be going through them at my own pace. Iāll share my journey and notes here as I move forward.
Day 4 - Installing software, exploring the file structure
- URL: https://linuxupskillchallenge.org/04/
- Previous Lesson: My Linux Upskill Challenge: Day 3
Installing packages in Ubuntu Linux
- Think packages like programs or applications (apps) that you install on you phone.
- Like the āApp Storeā or the āMarketā on your phone, in Linux we call them Package Managers.
- One of the most popular (if not the most used) package managers in Ubuntu (and other Linux distributions based on Debian) is apt.
- APT stand for āAdvanced Package Toolā and is used to install, update, and manage software packages.
- For example, to install a package, you can use the command:
sudo apt install <package-name>
- To update the list of available packages and their versions, run:
sudo apt update
- And to upgrade all installed packages to their latest versions:
sudo apt upgrade
- If you have a description of what the package does, you can search for it using the
apt search
command. For example: - This will display a list of packages matching the search term along with a brief description of each.
mc/noble-updates,now 3:4.8.30-1ubuntu0.1 arm64 [installed]
Midnight Commander - a powerful file manager
- Here we can see
mc
is the package name for the Midnight Commander package (application) - To install the package with apt you need to use sudo, unless youāre already logged with
root
.
sudo apt install mc
- Package managers like apt make it easy to handle dependencies and ensure your system stays up-to-date.
- There are other package managers available for Debian-based Linux distributions.
- For Red Hat-based Linux distributions, the equivalent of
apt
isyum
. (but thatās a completely different story! š)
Now we have installed Midnight Commander we can use his retro interface and esally navigate on Linux File System (and look cool in the process š)
Linux File System
- The Linux operating system has a standard file system structure. At first, it might seem a bit intimidatingāespecially if youāre only familiar with Windows, where you have the C: drive, D: drive, and various folders within each. With Linux, itās a totally different beast.
- The Filesystem Hierarchy Standard (FHS) defines the structure of file systems on Linux and other UNIX-like operating systems. However, Linux file systems also contain some directories that arenāt yet defined by the standard.
- If you want to read the official manual of the file system hierarchy type
man hier
The /
- Root Directory
- Everything on your Linux system is located under the
/
directory, also called root directory. (donāt confuse with the `/root directory) - In Linux you donāt have Drive Letters, like C: or D:, everything is under
/
, even if you have differet physical hard drives and partitions, all of them will be under/
.
The /etc
folder
- Key configuration files are stored here, and on subdirectories inside
- Must of the files here are simple text files
- Some interesting files under
/etc
/etc/passwd
: contains basic information of the account for each user in the system (like username, UID, shell, etc..) , the passwords are stored in another file/etc/ssh/sshd_config
: this is the configuration file for the SSH deamon (sshd
) (aka program), which acts as the server for the SSH connection. (the client is on your computer! š»).
The var/log
folder
- Must of the files here are simple text files
- Some interesting files under
/var/log
/var/log/auth.log
: Itās a log file that captures all the authentication events in the system
Questions š¤
- What actually means the ādefault shellā for a user in
/etc/passwd
? - What is actually a āshellā?