DEV Community

Cover image for Some Terminal Commands to Make Life Easier
slmhastings
slmhastings

Posted on

Some Terminal Commands to Make Life Easier

When you are used to doing something for so long, it could be a hard habit to break. Even though it takes up more time than it should we still do it. In particular I am talking about the computer mouse. As you read this, you will learn how to become faster and efficient at using the terminal so that you could use the mouse less!

cd *name of folder

  • This very popular command allows you to see into the chosen directory.

cd ../

  • Alternatively, this command backs you out of the current directory.

ls

  • This commands lets you see the files/folders inside of the current directory.

open

  • Pretty straightforward here, it opens the current folder or file. If you type the filename after 'open' then that particular file will open. If not, everything in the current folder will open.

mkdir *newfoldername

  • This allows you to create a new folder.

touch *newfilename

  • Create a new file using the 'touch' command

mv

  • To move a file to another folder or directory, you must use the mv command correctly. You would type in 'mv', the file name and the new location. Ex: $~ mv 'myfile' 'new/location'

clear

  • This is a very useful command for when you feel like you ust need a clean slate in your terminal. The clear command does just what the name implies, it clears you terminal.

help

  • Gives you a list of helpful commands

exit

  • Exit your terminal

Top comments (1)

Collapse
 
bdelespierre profile image
Benjamin Delespierre

cd - gets you to the previous directory you were in.
git checkout - checkout the last branch you were in.
You should also consider installing apparix