Working with basic Linux commands (Part-1)

Posted by

Linux is a free and open- source operating system. Also, It is very powerful and popular. Linux is a clone of UNIX but was created by Linus Torvalds from the scratch.

Linux is the most popular operating system for the servers. we can say that more than two-third of internet is powered by Linux.

You can simply change anything in Linux and redistribute it as your own product. Also, There are many various famous Distributions(Distro).

  • Ubuntu Linux
  • Red Hat Enterprise Linux
  • Linux Mint
  • Linux Kali

Introduction with “Terminal” or Linux shell

Moreover, terminal is the program which works as an intermediate between User and OS. It takes the instruction from user and give it to OS to process and show result. Therefore, we are going to learn some basic command that we can write on terminal GUI program to get our work done.

Linux commands

File handling

pwd-  To know in which directory you are, you can use the “pwd” command.

pwd command

ls-  This command is use to get the list of directory contents, like files and directories.

Syntax$ ls [options] [dir|file]

“ls” command options

These are various ls command options

These are various ls command options:-
ls command options

cd- cd allows to change directory. Ex, if you wanted to change from one directory to another your can use cd command.

cd [path]

To go back from where you started

To go in home directory we use ~ option

Run two commands together using “&&”

Creation and deletion of directory

mkdir & rmdir

We use “mkdir” to create a folder

Syntax of “mkdir”– mkdir [directory name]

We use “rmdir” to delete a folder.

Syntax of “rmdir”– rmdir [directory name]

Creation and deletion of FILE

“touch” touch command is used to create a file.
Syntax– touch [File name]

rm” – rm command is used to delete a file.
Syntax -rm [ File name]

That was all for part 1, we will soon post part 2 with more basic to advance Linux command tutorials.

Linux Commands Part- 2

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *