Day 2 DevOps challenge
Introduction to Linux and Basic Linux Commands(part -1)
What is Linux?
Linux is a free and open-source operating system kernel that was created by Linus Torvalds in 1991. It is the foundation for many popular Linux distributions like Ubuntu, Fedora, and Debian. Linux is known for its stability, security, and flexibility, making it widely used in servers, desktop computers, and embedded systems. It supports a wide range of hardware and software, and its source code is openly available for modification and distribution. Linux has a vibrant community of developers and users who contribute to its ongoing development and support.
The basic architecture of Linux :
✔️Application: -The application layer in Linux refers to the highest level of the software stack that interacts directly with users and provides specific functionality through various applications and services.
💡Examples: Web browsers, media players, etc.
✔️Shell: The shell layer in Linux is a command-line interface that acts as an intermediary between the user and the operating system, allowing users to interact with the system by executing commands and managing processes.
💡Examples: BASH,korn etc.
✔️Kernel: It is the heart of os. it is the core component of the operating system that manages system resources, provides device drivers, and facilitates communication between software and hardware.
✔️Hardware: Hardware refers to the physical components of a computer system that interact with the operating system through device drivers.
💡Examples: RAM ,Mouse, ROM, keyboard,CPU etc.
Basic commands in Linux you should know:
Commands | Description |
ls | List of directories |
cd | Change the current directory |
cd . . | Previous directory |
cd ~ | Back to the home directory |
mkdir | Make a new directory |
whoami | Username |
ls-a | List all the files and hidden files also |
ls-x | List all the contents row-wise |
clear | Clear the command prompt |
echo | To display something |
less | To display paged outputs in the terminal |
man | manual of any command |
uname | To get basic information about the OS |
grep | Search for a string within an output |
head | Return the specified number of lines from the top |
tail | Return the specified number of lines from the bottom |
diff | Find the difference between the two files |
cmp | Allows you to check if two files are identical |
iptables | Base firewall for all other firewall utilities to interface with |
sudo | Command to escalate privileges |
ssh | Secure Shell command |
service | To start and stop services |
useradd & usermod | Add a new user or change existing users data |
ifconfig | Display network interfaces and IP addresses |
passwd | Create or update passwords for existing users |
touch | To create an empty file |
touch -a | change access time of file |
touch -m | Change the modification time of a file |
rmdir | Remove directory |
cat | Display file contents on the terminal |
kill | Kill active processes by process ID or name |
pwd | Present working directory |
cp | For copying files |
mv | Move or rename files |
Thank you for reading
Follow me at LinkedIn to see interesting posts like this :)