Navigation in the unix shell#
Learning Objectives#
After working through this topic, you should be able to:
Explain what the present working directory (pwd) is
Use the pwd command to display your working directory
Use cd to navigate to different directories
Use ls to list directories
Use the z command to navigate more efficiently between files
Materials#
Video:
Download the slides.
Installation of the z-command#
The z-command is a command that allows you to navigate more efficiently. In case the screencast convinced you that installing it is a good idea, here are some instructions.
Download the z.sh file and save it as
z.sh
into the downloads folder.Move the file to
/usr/local/bin
. If you saved the file in the downloads folder you can open a terminal and run the command:
mv ~/Downloads/z.sh /usr/local/bin
Open the file
~/.zshrc
(or~/.bashrc
if you use bash) in a text editor and append the line:
. /usr/local/bin/z.sh
Close and reopen your terminal. You can test if you have successfully installed the command by typing in
z
.