LINUX
Linux is a free open-source, Unix-like operating system known for its stability, security, and versatility. It's at the heart of various Linux distributions used in servers, desktops, and embedded systems. It is developed by Linus Torvalds.
Features of Linux
Open Source: Linux is open-source software, with freely accessible source code.
Multi-User Support: It allows multiple users to work on the same system simultaneously.
Multi-Tasking: Linux handles multiple processes and tasks concurrently.
Stability: Linux is highly stable, with fewer system crashes.
Security: It features robust security controls and is less vulnerable to malware.
Scalability: Linux runs on a wide range of hardware, from small embedded devices to supercomputers.
Customization: Users can tailor Linux distributions to their specific needs.
Large Software Ecosystem: A vast repository of open-source software is available.
Command-Line Interface: Linux offers a powerful command-line interface.
Compatibility: It can run various file formats and software.
Fast Updates: Regular updates and security patches are released.
Some Flavors of LINUX
RHEL
Ubuntu
Debian
Amazon Linux
CentOS
Linux Architecture
The architecture of a Linux System consists of the following layers:
Hardware layer − Hardware consists of all peripheral devices (RAM/ HDD/ CPU etc).
Kernel − It is the core component of the Operating System, and interacts directly with hardware.
Shell − An interface to the kernel, from users. The shell takes commands from the user and executes the kernel's functions.
Application/Utilities − Utility programs that provide the user with most of the functionalities of an operating system.
Linux Folder Structure
Basic Linux Commands
Command | Syntax | Example | Description |
ls | ls [options] [directory] | ls -l /home/user | List files and directories in a directory. |
cd | cd [directory] | cd /var/www | Change the current directory. |
pwd | pwd | pwd | Print the current working directory. |
touch | touch [filename] | touch file.txt | Create an empty file. |
mkdir | mkdir [directory] | mkdir new_directory | Create a new directory. |
rm | rm [options] [file/directory] | rm file.txt | Remove files or directories. |
cp | cp [options] source destination | cp file.txt /backup | Copy files or directories. |
mv | mv [options] source destination | mv file.txt new_location | Move or rename files or directories. |
cat | cat [file] | cat textfile.txt | Display the contents of a file. |
more | more [file] | more longfile.txt | View file contents page by page. |
man | man [command] | man ls | Access manual pages and documentation. |
uname | uname [options] | uname -a | Display system information such as the kernel name, network node hostname, kernel release, kernel version, machine hardware name, and processor type. |
lsb_release -a | lsb_release [options] -a | lsb_release -a | Show Linux Standard Base (LSB) and distribution-specific information about the operating system. |
echo | echo [options] [string] | echo "Hello, World!" | Print the specified string to the terminal. |
cat | cat [options] [file] | cat file.txt | Display the contents of one or more files. |
useradd -m | useradd [options] -m username | useradd -m john | Create a new user account and create a home directory for the user. |
su | su [options] [username] | su root | Switch user to another account (usually to the root user). |
rm | rm [options] [file/directory] | rm file.txt | Remove files or directories. |
rm -rf | rm [options] -rf [directory] | rm -rf /path/to/directory | Remove directories and their contents forcefully. |
cd .. | cd .. | cd .. | Move up one level in the directory structure to the parent directory. |
cd ~ | cd ~ | cd ~ | Change the current working directory to the user's home directory. |
cd / | cd / | cd / | Change the current working directory to the root directory of the file system. |
Day 2 Task
Task: What is the Linux command to
Check your present working directory.
List all the files or directories including hidden files.
3. Create a nested directory A/B/C/D/E
"Your time spent reading this blog/article is truly cherished. May your learning journey be filled with happiness and knowledge!"
*"Linux: The Cool Cat of the Operating System Jungle!"*🐱