Introduction:-
Linux is an operating system originally developed by Linus Torvalds in 90’s for cloning the Unix operating system to personal computers (PCs). It is now one of the world-renowned software projects developed and managed by the open-source community.
With its open nature in software development, free in (re-)distribution, and many features inherited directly from Unix, the Linux system provides an ideal and affordable environment for software development and scientific computation. It is why Linux is widely used in most of scientific computing systems nowadays.
Architecture of Linux
The figure above illustrates a simplified view of the Linux architecture. From inside out, the core of the system is called the kernel. It interacts with hardware devices, and provides upper layer components with low-level functions that hide complexity of, for example, arranging concurrent accesses to hardware.
The shell is an interface to the kernel. It takes commands from user (or application) and executes kernel’s functions accordingly.
Applications are generally refer to system utilities providing advanced functionalities of the operating system, such as the tool cp
for copying files.
Linux file Directory system
/ :-
This is the default and only mount point for all file and folder. Inside this, you can get all the system and user data.
/bin/:-
It contains the basic binary files, which a user can use to run as Linux commands. Example:- bash, cat, chmod, cp, date, echo, grep, kill, ls, mkdir, mv, mount, more, ping, pwd, rm, sh, uname, umount, etc.
/boot/:-
It contains the boot loader file i.e grub or grub2. Linux kernel and other files required for the boot process. It is similar to the system reserved partition for Windows OS.
/dev/:-
It contains all the device files for the drive, keyboard, mouse, etc. Here you can find the file for your device. like:- vda, vdb, etc.
/etc/:-
This is an important folder that contains configuration files for the system. Sometimes you want to change some configuration of your network or system, you can found the file here and can change the configuration parameter of the respective file. It contains files like:- fstab, hostname, hosts, init, init.d, networks, passwd, profile, resolve.conf, services, shell, timezone, etc.
/home/:-
user’s personal files like- Documents, Downloads, Music, Video, etc.
/lib/:-
It contains the basic library files used by the system. Like DLL (Dynamic Link Library) in windows.
/media/:-
Its a default mount point for removable media devices (CD-ROM, USB keys, and so on). If you plug in a USB drive to your Linux system, it will automatically show on your desktop.
/mnt/:-
temporary mount point that can be used by root or user having access to it.
/opt/:-
It contains data of external applications provided by third parties. like Chrome, Skype, etc.
/root/:-
It contains the administrator’s (root’s) personal files.
/proc/:-
All files in this folder contains information about the active/running processes.
/sbin/:-
It contains the system binaries that can only access by root.
/srv/:-
All the service-related data are found here like- the services are started after boot and data used by servers hosted on this system.
/tmp/:-
temporary files to store data (this directory is often cleaned at boot)
/usr/:-
applications (this directory is further subdivided into bin, sbin, lib according to the same logic as in the root directory)
/var/:-
variable data of any Services. like every service has its own data and configuration. For configuration, the default folder is /etc/ and similarly /var/ is for data.
This is the basic file structure and structure information about the Linux operating system that we should know before using it.