Command line commands cheat sheet

pwd - shows which folder/directory you are in

cd [pathname] - changes which directory you are in, you either enter one folder name or type in the whole pah to a specific folder

cd …/ - moves you up one directory, multiple …/ moves up several directories, adding on a folder name will put you in that folder

mkdir [folder name] - creates a folder in the directory you are current in, can also use pathname to specify a different location

ls - shows you the files in the directory

ls -a - shows all files, including hidden ones

ls -l - shows files along info about them

touch [filename] - creates a file, it is best to add the extension

cat [filename] - shows contents of file


cd ~ - takes you to your root/home directory

does mean you have to create login at github

No this are just so people have a quick reference to navigate folders and in stuff in a non visual environment

im doing something wrong

Anything in [ ] is place holder text. Run an ls command to see what folders and files are present in your current directory. Run pwd to see your current path (where you are in the folder structure). Once you know where you are where you want to go you can use CD accordingly. That make sense?

1 Like

So you are in your root directory. Run cd Dev and then run ls to see what’s there

i think it working now. thank you for your help

1 Like

Thought of more commands:

explorer . - will open current folder in Windows so you can see your folders in a non text way (Mac and Linux you probably have something similar)

up and down arrows - will go to previous or next command that you have entered

[command] [part of filename] [press tab] - hitting tab after typing part of a filename will autofill the rest of the filename for you. Helpful if you have long filenames and/or many similarly named files

1 Like