- List Files and Folders
- List the Contents of Other Folders
- List Folder Contents Using Wildcards
- View a List of Files in Subfolders
- View a List of Contents in a Single Column
- View Contents As a Comma-Separated List
- View Hidden Files and Folders
- Visually Display a File's Type
- Display Contents in Color
- List Permissions, Ownership, and More
- Reverse the Order Contents Are Listed
- Sort Contents by Date and Time
- Sort Contents by Size
- Express File Sizes in Terms of K, M, and G
- Display the Path of Your Current Directory
- Change to a Different Directory
- Change to Your Home Directory
- Change to Your Previous Directory
- Conclusion
Change to a Different Directory
cd
It’s possible to list the contents of any directory simply by specifying its path, but often you actually want to move into a new directory. That’s where the cd command comes in, another one that is almost constantly used by shell aficionados.
The cd command is simple to use: Just enter cd, followed by the directory into which you want to move. You can use a relative path, based on where you are currently—cd src or cd ../../—or you can use an absolute path, such as cd /tmp or cd /home/scott/bin.