Linux Basics (Day 02): Mastering Essential Terminal Commands ππ»
DevOps Enthusiast | Python | Chef | Docker | GitHub | Linux | Shell Scripting | CI/CD & Cloud Learner | AWS
What is Linux?
Linux is an open-source, Unix-like operating system (OS) based on the Linux kernel, created by Linus Torvalds in 1991.Before Linux was created in 1991 by Linus Torvalds, most operating systems were:
Expensive β UNIX was powerful but costly.
Proprietary β Windows and macOS restricted user control.
Limited β No free, customisable alternative for developers and businesses.
Linux is a kernel, not a full operating system. However, it is often referred to as an OS because it is the core component of Linux-based operating systems (also called Linux distributions).
Linux = Kernel (the core system software).
Linux-Based OS = Kernel + Tools + UI + Applications.
When people say βLinux,β they usually mean a Linux-based OS , but technically, Linux itself is just the kernel.
Basic Commands:
Check your present working directory.
In Linux, you can check your present working directory (PWD) by using the following command in the terminal:
Input:
pwd
Explanation:
pwdstands for Print Working Directory.It shows the absolute path of the current directory you are in.
Output:
/home/user/Documents
List all the files or directories including hidden files.
To list all files and directories, including hidden files, in Linux, use ls-a.
Input:
ls-a
Explanation:
lsβ Lists files and directories.-aβ Shows all files, including hidden files (files starting with.).
Output:
. .. .bashrc .profile Documents Downloads Pictures
.β Represents the current directory...β Represents the parent directory.Files like
.bashrc,.profileare hidden files.
Create a nested directory A/B/C/D/E.
To create a nested directory structure (A/B/C/D/E) in Linux, we use mkdir -p A/B/C/D/E.
Input:
mkdir -p A/B/C/D/E
Explanation:
mkdirβ Creates a directory.-p(--parents) β Creates all parent directories if they donβt exist.



