Linux →basics to advanced

4 min readMar 2, 2023


“ Working on linux is easy as using your mobile phone all you need to do is just throw your window and boot your system as linux “

Now we are not going to discuss features and history “ ’cause if you here than you know the importance of it . we are going directly with the commands you need to know for basic use of linux

click on this link to use the discussed commads → “ github link of all basic linux commands

— — — — — Some of the basic commands — — — -

1. To create a file we have basically 4 commands which we use in daily works in linux — —

a. Cat command →this is used to create a single file or you can also concatenate two files — — -> cat >> filename .

b. Touch command →this is used to create multiple files in a single click but won’t allow to enter data in it you can also see or change the time stamp(last open or edit time) — → touch filename

c. vi or vim →this is an editor used to edit all kind of plain text ; useful in edit programs —>1. vi filename
2. esc + :wq ( to save and exit)
3.esc + q! ( exit without save)

d. Nano command →similar to vi and easy to use — -> nano filename

2. mkdir — → make directory used to create single or multiple folders
3. cd or cd .. →first one is used to go a particular folder or 2nd one for back to previous directory
4.pwd — → present working directory tells you in which folder you are
5.cp or mv — → to copy ,cut paste and rename of files
6. ls or ls -a — → to see list of normal or hidden files
7. rm — → to delete a particular file
8. rmdir — → to delete a particular folder
9. history — →tells about a list of commands used by you
10 grep — → to find out any word in a file
11. sort — → to arrange the content of file
12. tree — → to view the list folder or files in hierarchical way

— — —-Important but not basic commands — — — —

1.lsb_release -a — -> to check the operating system name and version

2.ifconfig — → to view the IP address of your system

3.apt install — → to install download applications or packages

4 . which — -> provides a location of particular package or file or folder

5. whoami — -> provides a name of a user working on a system

6. echo — -> to print a message on screen if multiple users are on same network

7. apt list — -> provide a list of installed software

8. sudo su — -> make you a root user which means you are a super user and can access and download and install anything in a system which a normal user can’t able to do

9. apt update — -> to update all the installed packages in one command

10. apt upgrade — -> to update all the downloaded software or packages

— — — — — — -Add users and groups — — — — — — —

users →if you are with working in project and you want divide work within the employees you can create users which can do different task have some permission to do but not all because they are not a root user

groups →just like in a company different groups work on different task of same project same as in System we can grouping up the users but that user need to be created first

commands →

1. useradd <user_name>
2. groupadd <group_name>

— — To zip, unzip, compress, decompress of file — —

“Tar” is an archiver used to combine multiple files in one file
are as follows →

  1. tar -cvf dir1.tar dir1 →to zip the file in one .tar is extension
  2. gzip dir1.tar →to compress the the file
  3. gunzip dir1.tar.gz →to decompress or .gz is extension for compressed file
  4. tar -xvf file1.tar →to unzip

Read Write and Execute permissions →

as we discussed above if you are a root user than you can do anything but if you a normal user than you have some permission as similar file also have 3 permission reading writing and execution you can also change it for in accordance to user limitation or use…..

  1. chmod → to provide or change the reading writing or executing permission for a particular user
  2. chown →to change the ownership(who can see the data of file) to a particular user
  3. chgrp →to change the group who can access the file with particular permission




Cloud computing and DevOps Engineer and to be as a fresher I am learning and gaining experiance by doing some hands on projects on DevOps and in AWS OR GCP