Printing Working Directory
In order to discover where you are currently located within the filesystem, the
pwd
command can be used. The pwd
command prints the working directory, your current location within the filesystem:pwd [OPTIONS]
Know this !!
Don't turn on your printer just yet! In the early days of computing the command line output would be sent to physical printers. This method was replaced by video displays which could display information more quickly. We still use the word print even though the output is just being displayed on your screen.
sysadmin@localhost:~$ pwd /home/sysadmin
The output of the above command indicates that the user is currently in their home folder, shown in the filesystem below.
Dis you Notice!
Notice our virtual machines employ a prompt that displays the current working directory, emphasized with the color blue. In the first prompt above, the blue
~
is equivalent to /home/sysadmin
, representing the user's home directory.sysadmin@localhost:~$
After changing directories, the new location can also be confirmed in the new prompt, again shown in blue.
sysadmin@localhost:/etc/calendar$
Comments
Post a Comment