What is linux
Linux is an open-source operating system that was created by Linus Torvalds in 1991. It is a free and powerful alternative to other popular operating systems like Windows and macOS. Linux is highly customizable and allows users to modify and adapt it to their specific needs. It is used in a wide range of applications, from servers to personal computers, and is known for its stability, security, and versatility. Overall, Linux is a robust and flexible operating system that offers users a high degree of control and freedom.
Linux Architecture
The architecture of Linux is based on a monolithic kernel, which means that all operating system services run in kernel space, providing direct access to hardware resources. The kernel is responsible for managing system resources such as memory, CPU, and I/O devices.
The Linux kernel is composed of different subsystems, including process management, memory management, file system, network stack, and device drivers. Each subsystem provides specific functionalities and interacts with other subsystems to provide a complete operating system environment.
In Linux, the shell is a command-line interface that allows users to interact with the operating system by executing commands. The shell is a program that interprets user input, executes commands, and provides output to the user.
Overall, the architecture of Linux is designed to be modular and scalable, allowing users to customize and configure the system to their specific needs while maintaining stability and security.
Linux File system hierarchy
Some basic Linux commands
pwd
: Displays the current working directory.pwd
ls
: Lists the contents of a directory.ls
cd
: Changes the current working directory.cd <Directories_name>
mkdir
: Creates a new directory.mkdir <Directory_name>
rmdir
: Deletes an empty directory.rmdir <Directory_name>
touch
: Creates a new empty file or updates the modification time of an existing file.touch <file_name>
cp
: Copies a file or directory.cp Source Destination cp Source Directory cp Source-1 Source-2 Source-3
mv
: Moves a file or directory.rm
: Removes a file or directory.rm <file or diectory name>
cat
: Displays the contents of a file.cat <file_name>
To write something inside a file we use vim command
grep
: Searches for a pattern in a file.grep pattern [files]
ps
: Displays information about running processes.kill
: Sends a signal to a process to terminate it.sudo
: Runs a command with superuser privileges.man
: Displays the manual page for a command.
What is the Linux command to
Check your present working directory.
pwd stands for Print Working Directory.
pwd
List all the files or directories including hidden files.
ls -a
Create a nested directory A/B/C/D/E
mkdir -p A/B/C/D/E
Thank you for reading
Let's Connect on LinkedIn.