Now it's time to dive into Linux !!

Now it's time to dive into Linux !!

Day#2

Let's start🐧

when we talk about Linux first thing that comes to our mind is what is Linux?🙄

In simple words, Linux is a free and open-source software operating system😃

  • Linux came from the Unix family but Linux is not a Unix derivative it was written from scratch and was developed by Linus Benedict Torvalds (Linux founder) in September 1991.

  • Today many year pass and Linux became one of the prevalent operating systems.

Important Linux features 🚀

  • open source

  • secure

  • simplified updates for all installed software

  • lightweight

  • multi user-multi task

  • multiple distributions - Redhat, Debian, Fedora, Ubuntu, etc.

Now try to understand the architecture of Linux !!😐

  • Hardware layer: It is the core of Linux. It consists of all peripheral devices(RAM, HDD, etc.).

  • Kernel layer: It is a collection of routines. It is loaded into memory when the system is booted and it Communicates directly with the hardware.

  • Shell: It is a user interface that helps a user to interact with Linux o.s.

  • Utilities & Application programs: This includes all of the applications and utilities which are present in your Linux o.s. some of like.Text editor, .web browser, .Email services, etc.

Before jumping into the Linux basic commands you have to need to understand the file system hierarchy of Linux !🤯!

In Linux, everything is represented as a file including a hardware program, The files are stored in a directory and every directory contains a file with a tree structure. That is called the file system hierarchy.

/home: Directory for other users.

/root: It is the home directory for the root user.

/boot: It Contains bootable files for Linux.

/etc: It Contains all Configuration files.

/usr: By default, the software is installed in this directory.

/bin: It Contains Commands used by all Users including root users.

/Sbin: It Contains Commands used by only the root user.

/opt : Optional application Software Packages

/dev: Essential device files. This includes terminal devices, USBs, or any device attached to the system.

Now the wait is over !🤩🥳

Linux command

Today we see only some basic commands in Linux.

  • Linux command to check your present working directory:

pwd: It gives the present or current working directory.

ubuntu@ip-172-35-3-112:~$ pwd

output-/home/ubuntu

  • Linux Command to list all the files or directories including hidden files:

The ls command lists files and directories within a system. Running it without an option will show the current working directories content.

ubuntu@ip-172-35-3-112:~$ ls

output -

batch3 DevOps-zero-hero file.text tester

ls -la is the command to list all the files or directories including hidden files

ubuntu@ip-172-35-3-112:~$ ls -la

output -

total 44

-rw-r--r-- 1 ubuntu ubuntu230 Jan 6 2022 .bash_logout

-rw-r--r-- 1 ubuntu ubuntu 3771 Jan 6 2022 .bashrc

drwx------ 2 ubuntu ubuntu 4096 Mar 19 04:33 .cache

-rw-r--r-- 1 ubuntu ubuntu 807 Jan 6 2022 .profile

drwxrwxr-x 4 ubuntu ubuntu 4096 Mar 20 15:12 batch3

drwxrwxr-x 3 ubuntu ubuntu 4096 Mar 20 14:42 devops-zero-hero

-rw-rw-r-- 1 ubuntu ubuntu 0 Mar 19 05:08 file.text

drwxrwxr-x 3 ubuntu ubuntu 4096 Mar 20 14:55 tester

l will display a long listing format of content.

ubuntu@ip-172-35-3-112:~$ ls -l

output -

total 12

drwxrwxr-x 4 ubuntu ubuntu 4096 Mar 20 15:12 batch3

drwxrwxr-x 3 ubuntu ubuntu 4096 Mar 20 14:42 devops-zero-hero

-rw-rw-r-- 1 ubuntu ubuntu 0 Mar 19 05:08 file.text

drwxrwxr-x 3 ubuntu ubuntu 4096 Mar 20 14:55 tester

a will list all the including hidden files and directories.

  • Linux command to create a nested directory A/B/C/D/E:

command to create a nested directory is

mkdir -p A/B/C/D/E

-p is for no error if existing, make parent directories as needed

tree command is used to show the nested directory.

Thank you very much for giving your valuable time for reading this article !!☺😊

Arijit Manna