Loading

20 Useful Linux Commands for all

20 Useful Linux Commands for all

Whether you are a newbie or seasoned developer, it is a must for every developer or engineer to learn some basic Linux commands. Here is a list of 20 basic but important commands that can help you a lot to gain a better understanding of your application environment.

ls

List all files and directories in the current working directory.

ls.jpg

pwd

pwd stands for Print Work Directory meaning it will show the directory where you are currently in.

pwd.jpg

cd

cd stands for Change Directory. If you want to browse from one directory to another you need to use the cd command.

cd.jpg

mkdir

To create a new directory.

mkdir.jpg

rmdir

To remove a directory. You can remove any directory by this command. Only if the directory is empty otherwise it can not be removed by rmdir command. But there is a way to remove a directory with its files or not.

rmdir_2.jpg

rm

Use rm command using -rf option. It will forcefully remove the directory.

rm.jpg

touch

The touch command is used to create an empty file.

touch.jpg

cat

This command is used to view the contents of any file.

cat.jpg

cp

This command is used to copy a file from source to destination.

cp.jpg

mv

This command is used to move a file from one location to another.

mv.jpg

cmp

This command is used to compare two files

cmp.jpg

history

This command is used to check the commands used in history.

history.jpg

find

This command is used to search for files from the terminal.

find.jpg

which

This command is used for searching the executable location of the given parameter.

which.jpg

locate

It is used to find the location of a specific file.

locate.jpg

grep

It is the most useful and powerful commands you can use when searching for patterns

grep.jpg

clear

It is used to clear out the terminal screen.

clear.jpg

sudo

It allows you to access the root from your user account.

sudo.jpg

chmod

It allows you to change or modify the access permission of system files or objects.

chmod.jpg

chown

It’s similar to the chmod command but instead of changing access permissions it enables the users to change the ownership of a file or directory.

Thank you for reading this. we will come back with some more interesting posts. Till then keep following us on Facebook, Twitter, Medium, LinkedIn, etc.

Related Articles