- Starting Up the Terminal
- Getting Started
- Building Pipelines
- Running Commands as Superuser
- Finding Help
- Moving around the Filesystem
- Manipulating Files and Folders
- System Information Commands
- Searching and Editing Text Files
- Dealing with Users and Groups
- Getting Help on the Command Line
- Searching for Man Files
- Using Wildcards
- Executing Multiple Commands
- Moving to More Advanced Uses of the Command Line
Moving around the Filesystem
Commands for navigating in the filesystem include the following.
pwdcommand allows you to know the directory in which you’re located (
pwdstands for “print working directory”). For example,
pwdin the desktop directory will show ~/Desktop. Note that the GNOME terminal also displays this information in the title bar of its window.
cdcommand allows you to change directories. When you open a terminal, you will be in your home directory. To move around the filesystem, use
cd ~/Desktopto navigate to your desktop directory.
cd /to navigate into the root directory.
cdto navigate to your home directory.
cd ..to navigate up one directory level.
cd -to navigate to the previous directory (or back).
- If you want to go directly to a specific, known directory location at once, use
cd /directory/otherdirectory. For example,
cd/var/wwwwill take you directly to the /www subdirectory of /var.