Run the following sequence of commands under your shell. What are the outputs of the three pwd commands? Why are the outputs of the last two pwd commands different?

```
$ pwd
$ bash
$ cd /usr
$ pwd
...
$
$ pwd
...
$
```

The outputs of the above commands are shown in the following session. The outputs of the last two pwd commands are different because the first displays the current directory under the sub-shell (which is /usr after the cd /usr has executed). The last pwd command displays the current directory in the parent (original) shell because terminates the sub-shell and returns to the parent shell.
```
$ pwd
/home/faculty/sarwar
$ bash
$ cd /usr
$ pwd
/usr
$
$ pwd
/home/faculty/sarwar
$
```

Computer Science & Information Technology

You might also like to view...

A miniPCIe is a memory storage card for smartphones

Indicate whether the statement is true or false

Computer Science & Information Technology

What does the "Enforce user logon restrictions" option do when configuring Kerberos?

A. It turns on Kerberos security. B. It forces the application of user configuration options defined by Group Policy. C. It forces a user to be subject to logon restrictions defined in the user's properties under Active Directory Users and Computers. D. It enforces the account password configuration options defined in Group Policy during the login phase.

Computer Science & Information Technology