Linux Series Part-1

Devundertree
5 min readMay 23, 2021

--

Hi folks, here we want to start a series on Linux and this is the content of the first week, our team will come to you every week with some useful content! share some love đź’“

Linux Introduction: What is Linux??

When listening to the word Linux, most people think of a complicated operating system, can only be used by programmers. But in actuality, it’s not scary as it seems.

Linux is an operating system(OS) that lets us communicate hardware with software. Linux is a free, Open-source OS, became popular due to its open-source nature. Linux is an entire family of open-source Unix operating systems, performed under the Linux Kernel. People who are using Linux OS, can change and restructure it under their name.

Based on the Linux kernel, there are the most popular Linux-based systems like Ubuntu, Debian, Fedora, Knoppix, Mint, etc. These are also called distros or distributions.

Relation between UNIX and LINUX:

Linux is like a child to UNIX, which laid out the foundation for Linux. Unix is designed for mainframes and used in enterprises and universities. Unix is paid source while Linux is free.

Since Linux is the clone of Unix. Usually, the commands used on both operating systems are the same. They might seem different but at the core, they look identical. So learning Linux is the same as Unix and vice-versa.

Benefits of Linux:

  • Linux provides a free operating system. You do not have to spend money to get OS like windows!
  • Easy for beginners to learn.
  • Linux doesn’t need antivirus as it is a highly secured system. Undoubtedly, there is a global development community that continuously improving its security. Therefore, more upgrades make the OS more robust and secure.
  • Stable and reliable (Top companies like Google, Facebook, amazon use Linux server environments).
  • Linux servers could run non-stop without a reboot.

When operating Linux OS, you need to use a shell, an interface that gives you access to the operating system’s services. Most of the Linux distros use a Graphic User Interface (GUI) as their shell. It is recommended to use a Command-Line Interface (CLI) because it’s more powerful and effective. Jobs that require a multi-step process through GUI can be done in seconds by entering commands in CLI.

Next, we are going to discuss the file system hierarchy which is present in Linux OS.

File Hierarchy System (FHS):

Note: Not all distros follow this pattern. Some do their special things also several ways of structuring the folders.

Let’s go!!!

What is File Hierarchy System ?

This defines structure and layout, maintained by the Linux Foundation.

See the picture depicted below showing the file systems structure.

  • /bin: In being short for binaries these are the most basic binaries which is another word for programs or applications.
  • /sbin: These are system binaries that the system administrator would use and that a standard user wouldn’t have access to unless the administrator’s permission.
  • /dev: This is where the devices live. This is typically an area that applications and drivers will access.
  • /etc: Normally called as edit to configure but indeed mean etc only. It is the folder where all configurations are stored.
  • /lib: It includes lib, lib32, lib64. These are where the libraries are stored. Libraries are the files that applications are used to perform various functions. They’re required by binaries in bin and sbin.
  • /proc: This is where we can find pseudo files contain information about system processes and resources.
  • /tmp: It is a temporary directory where files are temporarily stored by applications that could be used during a session. If the system rebooted, these files will disappear.
  • /usr: This is often the user application space where applications will be installed that are used by the user.
  • /var: it is known as a variable directory, contains files and directories that are expected to grow in size.
  • /home: This is the space where you store your files and documents like each user has their home folder and each user can only access their own unless they use administrator permissions.
  • /boot: It contains static files that are required to boot the system, such as the Linux kernel. These files help in the booting process of a system.

And some other directories are also present in other distros like /cdrom, /mnt, /snap, /run, /root, /srv, /media, /opt etc..

How to access these directories??

On opening the Linux terminal, we have the shell command as cd (change directory) in command Line Interface. Hit command as cd / then enter.

You can see the above picture saying that the directory was changed from the home directory (~) to the root directory (/).

Now type the command ls -ltr then enter. It gives the file hierarchy system. The full description will be given on upcoming pages.

Why and How to access root directory?

The root is an account or user name that default has access to all files and commands on a Linux. It can be referred to as a superuser, root user.

You can edit the files through the root. It can do functions like installing new software, changing the ownership of files, and managing other user accounts.

Access the root by entering command sudo -i then enter.

Then it asks for the password. Enter your login password. It allows entering the root directory.

--

--

Devundertree
Devundertree

Written by Devundertree

Blog to crisp your work in Programming & Tech!

No responses yet