The Operating System that Keeps the Tech World Running

Exploring the World of Linux

What is Linux?

Linux is a game-changer in the tech world. Its open-source nature and community-driven development have resulted in an operating system that's as versatile as it is powerful. Whether you're working on a computer, server, mobile device, or even an embedded system, Linux has you covered.

File System Hierarchy -

The hierarchical file system of Linux is a standout feature that organizes the operating system like a tree, where the root directory serves as the foundation and all other directories branch off, each fulfilling a distinct purpose. For instance, the /bin directory houses all the vital command binaries, while the /etc directory stores host-specific configuration files. You can find more examples in this cheat sheet.

  • /(Root): Primary hierarchy root and root directory of the entire file system hierarchy.

  • /bin: Essential command binaries that need to be available in single-user mode; for all users, e.g., cat, ls, cp.

  • /boot: Boot loader files, e.g., kernels, initrd.

  • /dev: Essential device files, e.g., /dev/null.

  • /etc: Host-specific system-wide configuration files.

  • /home: Users’ home directories, containing saved files, personal settings, etc.

  • /lib: Libraries essential for the binaries in /bin/ and /sbin/.

  • /tmp: Temporary files. Often not preserved between system reboots, and may be severely size restricted.

  • /mnt: Temporarily mounted filesystems.

  • /opt Optional application software packages.

How to create & edit a file

The command-line interface is another integral part of Linux. It's how you interact with the operating system and perform various tasks, from creating and editing files to managing software packages. Some popular commands include cat, touch, and vi/vim for file management, hostname, ifconfig, and yum for managing software.

To create a new file, you can use the cat command, which allows you to create a file but not change it after saving. If you want to merge different files, you can use the cat command followed by the names of the files you want to merge. The touch command is used to create an empty file, while the vi/vim editor can be used for more advanced editing tasks.

cat > (file name)
Touch (file name)
vi (file name)

The enchantment of configuration

The configure command certainly has some hidden magical powers. In general, it can be run without any additional arguments. However, there may be instances where you need to specify certain configurations for the software. Fortunately, the make tool can assist in this process.

By entering the command "./configure --help" (while in the directory of the downloaded software), a list of configuration options specific to that package will be displayed.

These options can greatly impact the success of an installation. Each software package will display unique options for the configure command, so it's important to run "./configure --help" before executing "./configure". Some possible configuration options include:

  • –prefix=PREFIX (install architecture-independent files in a non-standard location such as –prefix=/opt)

  • –build=BUILD (configure for a specific system architecture)

  • –host=HOST (the architecture of the system you want the file to run on, so you can compile the application on one machine and run it on another)

  • –disable-FEATURE (this allows you to disable specific features of an application)

  • –enable-FEATURE (this allows you to enable specific features of an application)

  • –with-PACKAGE=yes (use a specific PACKAGE)

  • –without-PACKAGE (do not use a specific PACKAGE)

Packages in Linux

In the past, installing software from a source was a common practice and relatively straightforward. The process involved downloading the source code, extracting it using either zip or tar, navigating to the newly created directory, and then executing the necessary commands to complete the installation.

The specific version of the OS that you have installed may require the installation of the build-essential and build-dep packages. These packages include the gcc/g++ compilers, and libraries, as well as additional necessary utilities.

sudo apt-get install build-essential build-dep
sudo yum install yum-utils

How to Install Packages

You can install these packages using the command: For managing software packages, Linux uses a package manager called Yum. Yum allows you to install, remove, and update packages easily.

To install a package, you can use the command "yum install package_name -y", while to remove a package, you can use the command "yum remove package_name -y". The command "yum update package_name" is used to update a package, and "yum list installed" shows a list of installed packages.

yum install httpd -y
yum remove httpd -y

In conclusion, Linux is a powerful and versatile operating system that offers various features for managing and manipulating data, running software packages, and performing other tasks. Whether you're a beginner or an experienced user, understanding the file system hierarchy, command-line interface, and software management tools in Linux is crucial to becoming proficient in using this OS.