DEV Community

Cover image for 06 Basic Commands Everyone should know
Gaurav Vala
Gaurav Vala

Posted on

06 Basic Commands Everyone should know

As a Web Developer you'll be dealing with different command line interfaces(CLIs) and while using front-end frameworks or dealing with back-end you'll be using terminal in MacOS or Command prompt in Windows a lot

As a beginner it might be confusing at first to deal with this interface where there is nothing you can do with mouse and everything is done by commands

So in this blog i will be sharing different basic commands that you should know even if you don't use Terminals much

cd - change directory

cd folder_name
Enter fullscreen mode Exit fullscreen mode

change directory command

this command works same as going into a folder

type command cd and then the name of the folder you want to go into, you can only go 1 step inside a folder or 1 step outside.

you can press tab after cd to see folder name in which you can go into

mkdir - make directory

mkdir folder_name
Enter fullscreen mode Exit fullscreen mode

make directory command

this command will create a new directory(folder)

this is same as clicking the new folder button.

start - open file

start folder_name/file_name/program_name
Enter fullscreen mode Exit fullscreen mode

opening program command

this command is used to start programs, open files or directories

after start use the tab to see the file or folder name which can be opened

delete - delete file

del file_name/folder_name
Enter fullscreen mode Exit fullscreen mode

delete command

this command is used to delete one or more file or folders

this command only works on folders with files in it, it will not delete empty folders

using this can permanently delete files

dir - list directory files

dir
Enter fullscreen mode Exit fullscreen mode

dir command

this command lists all the files in a folder you just navigate to the folder and type dir

this command can be really helpful when you don’t know what files are in the folder

this is mostly used with cd command. while navigating through folders you might wanna check if the file you want is in the folder

cls - clear screen

cls
Enter fullscreen mode Exit fullscreen mode

clear screen command

this command will clear the command prompt screen

this command is helpful when there are so many previous results and you want a clean area for your next command.

you can use up-arrow to see the previous commands you ran and you can run them again even if you run cls

These are just basic commands and they have some complex syntax too, with these complex syntax you can do more fun stuff with commands and command prompt.

Top comments (0)