What is Linux ?
Linux is an operating system, like Windows or macOS, that manages and controls a computer's hardware resources (such as processors, memory, and storage) to allow software applications to run. It is known for its open-source nature, meaning that its source code is freely available for anyone to view, modify, and distribute.
Linux comes in various distributions, often referred to as "distros" or "flavors." These distributions are tailored for different purposes, user preferences, and system requirements.
Ubuntu , Linux Mint , Fedora , Debian , CentOS , Red Hat Enterprise Linux (RHEL) , Kali Linux
Linux Architecture ?
The main components of Linux operating system are Application, Shell, Kernel, Hardware
Hardware Layer : Hardware layer of Linux is the lowest level of operating system track. It is plays a vital role in managing all the hardware components. It includes device drivers, kernel functions, memory management, CPU control, and I/O operations.
Kernel : The kernel is the core of the operating system, managing the computer's hardware and enabling communication between software and hardware components. It handles essential tasks like process management, memory allocation, and device interaction, serving as a crucial bridge for software applications to run effectively on a computer.
Shell : The shell is the user's interface to the operating system, allowing interaction through text-based commands. It interprets and executes commands, enabling users to control the system, run programs, and manage files using a command-line interface.
Linux File System Hierarchy
/ (root) : Primary hierarchy root and root directory of the entire file system hierarchy. Every single file and directory start from the root directory.
/bin : Essential command binaries that need to be available in single-user mode; for all users, e.g., cat, ls, cp. Contains binary executables.
/boot : Boot loader files, e.g., kernels
/dev : Essential device files, e.g., /dev/null. These include terminal devices, usb, or any device attached to the system.
/sbin : Essential system binaries, e.g., fsck, init, route.The linux commands located under this directory are used typically by system administrators, for system maintenance purposes
Some Basic Commands
To list all the files in a directory(folder) :
ls
To Make a Directory:
mkdir <file_name>
To make a file:
touch <file_name>
To make a directory and a file inside of it in one command:
mkdir -p <directory_name> : -p flag stands for parent i.e. first parent directory will be created and then the child
To check the user:
whoami
To check the path of present directory i.e. Directory you are currently in:
pwd
To print on screen:
echo
To read the contents of a file:
cat <file_name>
List all files in a directory including hidden ones:
ls -a : -a flag stands for all i.e It is used to display all files including the hidden ones.
To access the detailed information about the commands:
man [command]