Final answer:
To display the home directory, use the 'pwd' command. Then set the 'PS1' shell variable with 'export PS1='u12345678-task1:=> '' to change the shell prompt to your student number, where 'u12345678' should be replaced with your actual student number.
Step-by-step explanation:
To confirm that the present working directory is the home directory, you can use the pwd command in the terminal. Once you have verified that you're in the home directory, you can change the shell prompt to display your student number. The shell variable responsible for the prompt is PS1. You will use the export command to set this variable.
Here's a step-by-step explanation of how to set your prompt:
- Open the terminal.
- Type pwd and press Enter to execute the command. Confirm that the output is the path to your home directory, usually represented as ~ or something like /home/yourusername.
- To set the PS1 variable to your student number, type the following command:
- export PS1='u12345678-task1:=> '
- Press Enter. Now, your prompt should change to reflect your student number.
Remember to replace 'u12345678' with your actual student number. The shell prompt will now display your student number followed by -task1:=> before each command you type.