The pwd Bash builtin prints the current working directory for the script to the standard output:
$ pwd /home/bashuser
The working directory for the shell refers to the directory from which all relative paths are based, even if they have multiple levels of directories in them:
$ pwd /home/bashuser/docs $ ls important/doc1.txt important/doc1.txt $ ls doc2.txt doc2.txt $ ls nonexistent ls: cannot access 'nonexistent': No such file or directory
Any path that starts with a forward slash – a leading slash – is instead an absolute path, and resolves independently of the current directory:
$ ls /home/bashuser/important/doc1.txt ...