The LINUX!
Yes, Linux, is a free and open-source operating system based on UNIX System. It was first created by Linus Torvalds in 1991 as a hobby project and has since grown into a widely used operating system for servers, supercomputers, and mobile devices.
Linux is known for its stability, security, and flexibility, and is used by many businesses, governments, and individuals around the world. It comes in many different distributions, or "distros," each with its own set of pre-installed software and configurations. Some popular distros include Ubuntu, Debian, Fedora, and CentOS.
The analogy to Windows OS
Yes, it's quite overwhelming when starting with a Linux system as it contains a lot of options and requires a lot of interaction from the user.
As well the terminology also differs. Iykyk ;>
For Windows, we are creating a primary partition namely C: and then installing our OS in it. However, circumstances change while for the Linux System. As it is simply following the UNIX standards.
Can we talk about Ubuntu a little bit before we start?
You might be thinking about Ubuntu from the very initial of this blog. The reason is that Ubuntu is a quite famous distro, a distribution (an OS based on Linux).
Since its historic period, when other GNU/Linux operating systems were quite hard to set up (during the early 2000s), Ubuntu appeared as an operating system with convenient default settings.
Making it a widely used operating system, especially for beginners and trainers.
Will try to be aligned with the Ubuntu system in this blog to make the leaner easily adapt to the environment. But remember, every distro will have the same concept to be understood.
Now talking about the core of the file system and partition, we often see this:
This system is made while installing the Linux distribution. Some conditions might changes if we're dual-booting. But do not worry, changes will not be drastic.
A major point to remember while setting up:
All the major file hierarchies will be accepted and made in this 'root /' partition itself. This root partition is very important and denoted by '/' i.e. a forward slash.
Wooofffff!! Take a break, we've learned a lot till here.
The Hierarchy:
We're getting to the core of the system where all the established and necessary files are kept which helps keep running the system. Let's discuss this.
Remember, I'll be referring to the Ubuntu system but the hierarchy will remain same on the most of the distros.
The picture shows the Root / folder of Ubuntu. All the directories and folders are here to make the system work with the daemon.
But you might be wondering what is the use of all these folders and files. Right?
So let's discuss them:
Image Courtesy: geeksforgeeks.org
Take our flight to the first directory / (Root): The directory is called “root.” It is the initial point for the file system hierarchy. Every single file and directory starts from the root directory.
Remember: This is not related to the root, or superuser, account./bin: It simply contains essential command binaries that need to be available in single-user mode; for all users, e.g., cat, ls, cp. Contains binary execs as well. That's the major deal.
/boot: Contains files such as boot loaders which are mainly termed as kernels or initrd.
All the files for kernel initrd, vmlinux and grub files are located under /boot.
So if you refresh this, the kernel will be reloaded to the recovery mode.
Some examples: initrd.img-2.6.32-24-generic, vmlinuz-2.6.32-24-generic/dev: Contains files for terminal devices such as UBS or any attached device to the system.
Example: /dev/tty1, /dev/usbmon0/etc: Very important directory, as it contains files required by all programs. As well contains startup and shutdown shell scripts used to start/stop individual programs.
Our shell configuration files are stored here for ssh.
Example: /etc/resolv.conf, /etc/logrotate.conf/home: This contains Users’ home directories, containing saved files, personal settings, etc.
/lib: Libraries essential for the binaries in /bin/ and /sbin/ are stored here. The filenames are either ld* or lib*.so.*
Examples: ld-2.11.1.so, libncurses.so.5.7/media: Mount points for removable media such as CD-ROMs. Serves as temporary mount directory for removable devices
Examples: /media/cdrom for CD-ROM/mnt: Temporarily mounted filesystems, temporary mount directory where sysadmins can mount filesystems.
Just like mounting the boot or a hard disk./opt: It simply contains add-on applications from individual vendors.
/sbin: Just like /bin, /sbin also contains binary executables.The linux commands located under this directory are used typically by the system administrator, for system maintenance purposes.
Example: iptables, reboot, fdisk, ifconfig, swapon/usr: Contains binaries, libraries, documentation, and source code for second-level programs. Contains the majority of (multi-)user utilities and applications.
Since I've covered most of the basic aspects of the Linux hierarchy and basic file system. All the folders are covered under the Root '/' directory and stand for system calls and maintenance.
I hope now you all can understand the system-generated folders and directories and what they stands for.
I am also attaching one link to one of my twitter threads which guides to the installation and setting up of Arch-Linux with customized partition.
Here you go: https://twitter.com/_TauqeerAhmad/status/1651226109474742278