» » Basic commands in Linux

Basic commands in Linux

posted in: General | 0
Spread the love

About linux

Linux is an Operating System’s Kernel.Well, Linux is a UNIX clone. But it was actually created by Linus Torvalds from Scratch. Linux is free and open-source, that means that you can simply change anything in Linux and redistribute it in your own name! There are several Linux Distributions, commonly called “distros”. A few of them are:

  • Ubuntu Linux
  • Red Hat Enterprise Linux
  • Linux Mint
  • Debian
  • Fedora

What is the terminal?

So, basically, terminal is a program that receives commands from the user and gives it to the OS to process and it shows the output. Linux’s terminal is its main part. Its distros come in GUI(Graphical User Interface) but basically, Linux has a CLI (Command Line Interface). In this article, we are going to cover the Basic Commands that we use in the terminal of Linux.Linux Commands

Linux Commands

Some of the basic commands

1. pwd

Pwd Commands is helps you to find the absolute directory that starts from the root.The root is the base of the Linux files system.

2. ls

The Is” command is used to know what files are there in the directory you are in. You can see all the hidden files by using the command “ls -a”.

3. cd

cd” is the command used to go to a directory.For example if you want to go to the Downloads

just give “cd Downloads”

4. mkdir & rmdir

The mkdir command is used when you need to create a folder or a directory. For Example, if you want to make a directory called “DIY”, then you can type “mkdir DIY”. Remember, as told before, if you want to create a directory named “DIY Hacking”, then you can type mkdir DIY\ Hacking”.

rmdir is the command used for deleting a directory. But, rmdir can only be used to delete an empty directory. To delete a directory containing files, rm is used.

5. rm

The rm command is used to delete files and directories. rm cannot simply delete a directory. “rm -r” is used to delete a directory. In this case, it deletes both the folder and the files in it.

6. touch

The touch command is used to create a file. It can be anything, from an empty txt file to an empty zip file. For example – “touch new.txt

7. cp

The cp command is used to copy files through the command line. It takes two arguments, the first one is location of the file to be copied, the second iswhere to copy.

8. mv

The mv command is used to move files through the command line. We can also use the mv command to rename a file. For example, if we want to rename the file “text” to “new”, we can use “mv text new”. It takes the two arguments just like the cp command.

Follow rajeshwari:

Latest posts from

Leave a Reply