Prince Joal
Software Engineer
  • Name: Prince

  • Birthday: 28 February 1993

  • Job: Freelancer

  • Email: [email protected]

  • Skype: 1081a1d198d8081c

linux commands

This article is about linux terminal commands

$ pwd – The pwd command is used to display the location of the current working directory.

pwd-cmd

$ mkdir <directory name>  

The mkdir command is used to create a new directory under any directory.

mkdir

$ rmdir <directory name>

The rmdir command is used to delete a directory.

rmdir

$ ls

The ls command is used to display a list of content of a directory.

ls

$ cd <directory name>

The cd command is used to change the current directory.

cd

$ touch <file name>

The touch command is used to create empty files. We can create multiple empty files by executing it once.

touch

$ cat <file name>

The cat command is a multi-purpose utility in the Linux system. It can be used to create a file, display content of the file, copy the content of one file to another file, and more.

$ rm <file name>

The rm command is used to remove a file.

rm

$ cp – <existing file name> <new file name>  

The cp command is used to copy a file or directory.

cp

$ mv <file name> <directory path>  

The mv command is used to move a file or a directory form one location to another location.

mv

$ less <file name>  

The less command is similar to the more command. It also includes some extra features such as ‘adjustment in width and height of the terminal.’ Comparatively, the more command cuts the output in the width of the terminal.

less

$ htop

htop allows you to monitor processes running on the system along with their full command lines. We can perform tasks related to processes (killing, renicing) without entering their PIDs. Htop allows us to sort the processes on the basis of CPU, Memory and Time Interval. It also allows us to sort all the processes owned by a particular user.

htop

$ ncdu /

Ncdu is a command line tool to view and analyse disk space usage on linux. It can drill down into directories and report space used by individual directories. This way it is very easy to track down space consuming files/directories. It actually allows the user to do this much faster than even a gui file manager

after scanning

$ free -m

The free command is a very simple command which simply shows few lines about the memory. The free command can be used to show total memory, used memory, free memory, shared memory, and available memory about RAM and swap space

free

$ df -h

Use the df command to show the amount of free disk space on each mounted disk. The usable disk space that is reported by df reflects only 90 percent of full capacity, as the reporting statistics leave a 10 percent above the total available space. This head room normally stays empty for better performance.

 

 

Tags: Technology

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x