Basic Linux Commands

By Ajay Kunwar | basiclinuxcommands | 22 Apr 2020


 

About Linux

860f0d4f090afda3fcdf9e54e31ef1e772b71433f580caebfa0ea474c085088c.png

Linux is a powerful operating system ,first released on September 17, 1991, by  Linus Torvald. Linux is leading operating system on servers and other big systems.It is free open source software as its code is freely available. It gained popularity because of its fast performance and very efficient system.Ubuntu, Debian,Fedora are some of the popular linux distributions.

 

Terminal/Shell

8ae475dcb37bf128f9b5872f3cb292c906d0d4c43a46bad82a58f63307a14f78.png

It provides an interface into which users can type commands and that can print text.

Opening a terminal :
Press ctrl+alt+t
or
Go to activities on the top left side of the screen and type
"terminal" / "command" / "shell" or "prompt".

 

Some of the basic linux commands

 

1. pwd (Print Work directory):
It shows the directory you are currently in.

d2a29c00dbd032a1ee2c6202fa62ad4e8e7c4160b16d5f24541b0cccefbdaa56.png

2. ls:
It shows the contents of a particular directory i.e. both files and directories.

a359e3178052e96381ad8d76e6d85990740513603ae612d1c499d3608fccea58.png

3. cd (Change Directory):
It is used to change the directory.

ac0d20fae66f42eff98ed68763c3413bb1e070dd16ad3803ae248fa3a4847574.png

4. mkdir (Make Directory):
It is used to create folders anywhere you like in Linux system.

bcf1e2614606647f43e93b5737e4cb078ca4ac909ff92b3e122b7d7a940fe4ef.png


5. clear:
It wipes out the terminal screen after some earlier commands.

c01f5a742f4af9a0223ae1950e74a94b10ef413c471917c9326b867cec4a3862.png


6. sudo:
It lets non-privileged users access and modify files that require low-level permissions.

7. touch:
It is used to create a file.

c521c00692b534c52b5e64a20f9e1e374f64edf2fb19ab474fdf34d5fa9d59fc.png


8. mv:  It is used to move a file.


9. ping:
It is used to check your connection to a server.

d619a50a89e5b1d537650cfba8c8f62c4bf5891ebf1edfee7eb87ba717c29f70.png

10. apt-get: 

It is used to update/upgrade/install or remove a package.

To update packages in our system using command:
sudo apt-get update

To upgrade the installed packages to their latest versions:
sudo apt-get upgrade

To install the package:
sudo apt-get install packagename

To remove a package:
sudo apt-get remove packagename

Ctrl+C to stop any command safely.
Ctrl+Z can be used to force stop it.
To exit from the terminal use the exit command.
To power off use the command sudo halt and to reboot the computer sudo reboot.

How do you rate this article?

2


Ajay Kunwar
Ajay Kunwar

CS student.


basiclinuxcommands
basiclinuxcommands

Why you should learn basic linux commands?

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.