Most Important Linux Commands for Developers

Kisan Tamang
Nov 14 · 4 min read
Image for post
Image for post
Linx processes

Before going into the list of commands, let’s talk a little about Linux Shell.

What is Shell?

A shell is a command-line interpreter that takes commands from the user and provides an interface between the user and the operating system. It can directly invoke the Operating System Level APIs.

Shell is a programming language itself. It has its own capabilities of loops, conditionals, functions, arrays, etc.

Some of the popular shell examples are:

  1. Bash
  2. Zsh
  3. Ksh
  4. Tcsh, etc

Most Commonly used Commands

1. man command

It is used to read the documentation of tools. Whenever you need help, this command becomes such a handy tool.

For e.g. to see the manual of vim hit $ man vim

Image for post
Image for post

2. vim command

vim is a terminal-based text editor. You can use it as your code editor.

Image for post
Image for post

3. chown command

chown the command allows you to change the user or group ownership of the file, directory, or symbolic link.

chown [OPTIONS] USER[:GROUP] FILE(s)
Image for post
Image for post

In the above example, cloudyfox is the owner of config.php. There are lots of other options you can pass into the chown command.

4. chmod command

In Unix-like operating systems, the chmod command is used to change the access mode of a file.

For e.g to make a file executable hit chmod +x <filename>

5. ls command

ls to list the files and folder in the current working directory.

Image for post
Image for post

In the above example, the ls command listed all the files and folder located inside ~/Documents.

6. pwd command

pwd to check which working directory you are in.

Image for post
Image for post

7. mkdir command

mkdir <directory name> to make a new directory or folder.

8. rmdir command

rmdir <directory name> to remove the specified directory. It won’t delete the directory if it is not empty.

9. touch command

touch <filename> to make a new file. For example, if you need index.html a file then hit touch index.html

10. cd command

cd <path to the location> change working directory.

11. cp command

cp <file> <path to destination> copy files from one location to another.

12. mv command

mv <file> <path you want to move move files or folder

13. cat command

cat <file> to display the content of files.

Image for post
Image for post

14. grep command

Grep is an acronym that stands for Global Regular Expression Print. Grep is a Linux / Unix command-line tool used to search for a string of characters in a specified file.

Image for post
Image for post

In this example, I searched for word editors in sample.txt and it is highlighted in red.

You can use these commands with many other options.

15. tar command

The tar command on Linux is often used to create .tar.gz or .tgz archive files, also called “tarballs.”

e.g tar -czvf name-of-archive.tar.gz /path/to/directory-or-file

16. du command

du command, short for disk usage, is used to estimate file space usage.

Image for post
Image for post

In the example, it shows the disk usage of the directory Ebooks. $du Ebooks

17. df command

The df command (short for disk free), is used to display information related to file systems about total space and available space.

Image for post
Image for post

18. kill

kill command is used to kill the specified process in the Linux system.

e.g $ kill pid

You can pass any options to kill command.

That’s it. These are the frequently used commands of daily Linux user. I use these commands almost every day in my job. And it really depends on what job you are doing. If you do an administrative kind of job, then there are so many command based tools like htop, top, netstat, ping, ifconfig, etc.

$ Happy Learning >_

JavaScript In Plain English

New JavaScript + Web Development articles every day.

Kisan Tamang

Written by

Developer at cloudyfox.io, and a true Technologist. Passionate in Cloud, Containers, Serverless, microservices, DevOps, and more.

JavaScript In Plain English

New JavaScript + Web Development articles every day.

Kisan Tamang

Written by

Developer at cloudyfox.io, and a true Technologist. Passionate in Cloud, Containers, Serverless, microservices, DevOps, and more.

JavaScript In Plain English

New JavaScript + Web Development articles every day.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store