10 terminal commands every developer should know

10 terminal commands every developer should know

As a developer command line is a crucial skill to have. So, in this article, I’ll share the top 10 command line command every developer should know.

·

2 min read

As a developer command line is a crucial skill to have. So, in this article, I’ll share the top 10 command line command every developer should know.

Let’s get started.

If you prefer video then check it out:

#1. mkdir

Make directory. With this command, you can create a folder easily

mkdir folder-name

#2. cd

After creating a directory/folder we need to go to that directory. We can do so with cd

cd folder-name

#3. cd ../

The next one is cd ../ this command used to go one step back. For example, if you are inside “folderA” and it’s on the desktop. You can use this command to go back to desktop.

cd ../

#4. rmdir

So, you created a directory/folder now you want to delete it. You can do so with this command

rmdir folder-name

#5. touch

We need to create files a lot. we can do that easily with this command.

this command will create a .html file. when creating a file don’t forget to add the extension.

touch index.html

#6. ls

If you want to see how many folders and files a directory have. You can use this command to see. All you need to do is go to that directory and run this:

ls

#7. mv

With this command, you can move a file to another directory. You need to provide the file name and the directory you want to move the file. like this:

mv file.txt moveTo

#8. rm

With is the command you can delete a file and a folder. When you want to delete a folder with this command just add an -r flag at the end.

like this:

// remove file
rm file.text

//remove directory
rm folder-name -r

#9. date

This command is a fun one. It just prints out today's date, just for fun.

date

#10. pwd

This command print out the current directory you are in.

pwd

Conclusion

Working with the command line makes a programmer's life a lot easier. If you don’t use the command line, I highly recommend starting using it.

If you enjoyed reading this article, I think you’ll also enjoy my newsletter where I share my articles and videos, and resources I found online.

Subscribe Now!

connect with me on Twitter at coderamrin