We're planting a tree for every job application! Click here to learn more

12 Terminal Commands I Use Every Day as a Developer

Elias Degu

21 Mar 2022

3 min read

12 Terminal Commands I Use Every Day as a Developer
  • JavaScript

How to effectively use the computer terminal as a software developer.

It’s one thing to write computer programs but another to be a productive developer and use the computer the best way to ease your development workflow.

Today, If anyone needs to become a good developer, he or she must know how to use the computer terminal effectively as it saves tons of development time for them.

From downloading the image of the directory structure for a blog post to moving the files from one directory to the other, to transfer files from your computer to the server, and maintaining a server, today, everything happens with the command line.

Therefore it is vital to know these terminal commands.

This articles covers the top 12 terminal / Linux commands that would help technology enthusiasts better navigate the computer resources with the help of the command-line interface.

1. tree

Have you ever wanted to get the directory structure of your folder in a tree-like layout? Then you are in luck! This command will help you achieve precisely that. You would need to install it in macOS. It is already available in Linux. brew install tree Go to the working directory and type the below command in the terminal tree

2. man

If you want to know anything about the terminal command itself from the below list, use the man command to get the official documentation of the command from the developers right in your terminal. man ls

3. ls

The command helps you list out the contents in the directory. If you want to view hidden files too in the directory, use the additional -a argument. ls ls -a

4. cd

The command lets you change the directory you are currently working in. cd [ Directory Name ] cd Desktop

5. touch

Create a new file within the working directory with the touch command. touch [ filename ] touch index.js

6. mv

Move the files from one directory to the other. It is by far the most practical command I use in my day-to-day work. Syntax: mv [ file-move-from ][ file-move-to ] mv ~/Downloads/file.txt ~/Documents/Work/file.txt

7. cp

The command lets you copy the files from one directory to another. Syntax: cp [ file-source ][file-destination] Copy the contents of file-1 and file-2 into a new file. touch new.txt cp file-1.txt file-2.txt new.txt

8. grep

It is also known as the search command in the terminal. It searches through a file and prints all the lines that match the given pattern. Syntax: grep [pattern][filename] touch index.js echo 'console.log('hello world')' >> index.js grep console index.js

9. top

View the stats of your system in the terminal with the help of this terminal command. It includes CPU utilization, disk storage information, memory by software programs. top

10. cat

The cat command is the most convenient command for data engineers. Data Analysts use it to create files, view the contents of the files, merge two or more files into one, or even add data to the files. Yes, you can mix two or more excel or number files with this single command. Merge the content of all the files in the directory into one file. cat *.txt >> ~/Desktop/combined.txt Append the content of file-1 at the end of the contents of file-2. cat file-1 >> file-2 Create a file using the touch command and add a programming statement using the echo command. touch index.js echo 'console.log('hello world')' >> index.js

11. pwd

A developer can use this command to view the current public working directory in the system. It means to print the working directory. pwd

12. lscpu / sysctl

Use this command to view the contents of the CPU. It includes finding the cores in a system, its efficiency, and other related things about the computer CPU performance. lscpu is a Linux command. An alternate to it in mac OS is sysctl. lscpu Get the number of cores in your computer on Mac OS. sysctl -a | grep machdep.cpu.core_count

Conclusion

The above are the top twelve terminal commands that one can use to speed up the development process. One can also use it inside the programming language to create their own command-line interface apps. But the scope of it is beyond the content of this post. I will save it for some other day.

Did you like this article?

Elias Degu

See other articles by Elias

Related jobs

See all

Title

The company

  • Remote

Title

The company

  • Remote

Title

The company

  • Remote

Title

The company

  • Remote

Related articles

JavaScript Functional Style Made Simple

JavaScript Functional Style Made Simple

Daniel Boros

12 Sep 2021

JavaScript Functional Style Made Simple

JavaScript Functional Style Made Simple

Daniel Boros

12 Sep 2021

WorksHub

CareersCompaniesSitemapFunctional WorksBlockchain WorksJavaScript WorksAI WorksGolang WorksJava WorksPython WorksRemote Works
hello@works-hub.com

Ground Floor, Verse Building, 18 Brunswick Place, London, N1 6DZ

108 E 16th Street, New York, NY 10003

Subscribe to our newsletter

Join over 111,000 others and get access to exclusive content, job opportunities and more!

© 2024 WorksHub

Privacy PolicyDeveloped by WorksHub