Terminal Navigation
Introduction#
This topic contains information about navigating throughout the filesystem using the terminal.
Basic Navigation Commands
Change Directory
Navigate to a directory
cd [directory]Example: Changing to the projects directory
username$ cd projectsNavigate to the root directory (regardless of working directory)
cd /Navigate to the parent directory (the directory containing the working directory)
cd ..Navigate to the home directory
cd ~Print Working Directory
Prints the path of the directory that you are working in
pwdExample: Printing the working directory while in the projects folder
username$ pwd
/Users/username/projectsList
List the files that are in the current working directory
lsExample: Listing the files in the projects directory
username$ ls
PythonProject
JavaProject
screenshot.png
index.html
paper.pdfFiles are listed with their file extension, directories are listed with no extension.
Use ls -l to get more information about files (size, timestamp, owner)