What is this?
You might be an aspiring developer. Perhaps you just want to brush up on some basic terminal commands. No matter what, you've found the right place. Visit the menu for other languages.
Modify files and folders
These commands will help you create, modify, and delete files and folders.
This command has many uses, but most commonly for beginners, cat is used to output the contents of a [FILE] to the terminal
cat hello.txt Hello World!
Create a new folder with the desired [FOLDER_NAME]. This occurs in your current working directory
ls Desktop Music mkdir example_folder ls Desktop Music example_folder
cp [FILE] [DUPLICATE_FILE]
Make a copy of a file
ls hello.txt cp hello.txt hello2.txt ls hello.txt hello2.txt
mv [FILE] [MOVED_FILE]
Move files and folders. Can also rename files and folders
ls hello.txt mv hello.txt hello2.txt ls hello2.txt
ls hello.txt world.txt rm hello.txt ls world.txt
rm -r [FOLDER]
Delete a [FOLDER] recursively, which means the folder and everything in it
ls Desktop Music example_folder hello.txt rm -r example_folder ls Desktop Music hello.txt
These essential commands will help you navigate, explore, and perform simple actions on your terminal.
List the normal files and folders in the current directory in condensed format
ls Desktop Documents Music
Output the full path of the current working directory for this terminal
Change your current working directory. When used by itself, it will default to changing to your home directory
Change your current working directory to the desired [FOLDER]
pwd /Users/me cd Desktop pwd /Users/me/Desktop
Change your current working directory to the parent directory
pwd /Users/me/Desktop cd .. pwd /Users/me