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


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 is yum. (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 šŸ¤”