Basic terminal commands everyone must know

Cheuchheang Sear
3 min readMar 6, 2023

--

Photo by Gabriel Heinzer on Unsplash

Generally, there are 2 main ways to communicate with your computer: Command Line Interface (CLI) and Graphical User Interface (GUI). Some developers prefer GUI to CLI and also a lot of development tools nowadays also have really good GUI. I don’t say which one is better, but I can say you will work faster if you know how to use the command line.

Here are some basic and useful command that you should know as a developer:

man

The man command is your manual and is very useful when you need to figure out what a command does.

command line man pwd
man pwd

pwd

The pwd command writes the full pathname of the current working directory to the standard output.

cd

The cd command is used to change the directory you’re in.

mkdir

The mkdir command is used to create directories.

touch

The touch command is used to create files.

ls

The ls command is used to view all files within specified directory.

mv

The mv command is used to move files or to rename the directory.

move file `newFile.txt` from newDir to newDir2
rename directory from `newDir` to `newDir3`

less

The less command is a command that displays file contents or command output one page at a time in your terminal.

cat

The cat command is used to read data from the file and gives their content as output.

grep

The grep command is used to search text for patterns specified by the user.

pipe

The pipe command is the standard output of one command and passes it as the input to another.

Note: you can use options for these commands as well to reach your need by using flag

Conclusion

These are just some of useful commands that I usually use in my daily life, but there are still a lot of more interesting commands that you can learn by yourself. Again, using command line is a skill that all of developers must have. It will make your developer life easier and faster. 🙌

Here are some resources for you:
Bash for beginners
Basic build-in terminal commands

--

--

Cheuchheang Sear

A Full Stack Bootcamp student with passion in coding. Experienced with HTML, CSS, Javascript, frameworks such as React.js and Next.js.