From 2a06e320932c3064e9325e866c8d00bfc44951b9 Mon Sep 17 00:00:00 2001 From: Akshay Ithape Date: Sat, 8 May 2021 22:35:32 +0530 Subject: [PATCH] Added 06-Lab-Linux-Bash-Shell --- .../06-Lab-Linux-Bash-Shell.md | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/docs/02-Working-With-Shell-Part-I/06-Lab-Linux-Bash-Shell.md b/docs/02-Working-With-Shell-Part-I/06-Lab-Linux-Bash-Shell.md index 2ad19ca..cc6c569 100644 --- a/docs/02-Working-With-Shell-Part-I/06-Lab-Linux-Bash-Shell.md +++ b/docs/02-Working-With-Shell-Part-I/06-Lab-Linux-Bash-Shell.md @@ -2,13 +2,35 @@ - Access Hands-On Labs here [Hands-On Labs](https://kodekloud.com/courses/873064/lectures/17074355) -1. To check the default shell for the current user.Display the shell for the current user but not necessarily the shell that is running at the movement. +1. To check the default shell for the current user. Display the shell for the current user but not necessarily the shell that is running at the movement. ``` $ echo $SHELL ``` -1. To change the shell for bob from **`Bash`** to **`Bourne Shell`** +2. To change the shell for bob from **`Bash`** to **`Bourne Shell`** ``` $ chsh -s /bin/sh bob ``` - - +3. What is the value of the environment variable **`TERM`** + ``` + echo $TERM + ``` +4. Create a new environment variable called **`PROJECT=MERCURY`** and make it persistent by adding the variable to the **`~/.profile`** file. + ``` + echo export PROJECT=MERCURY >> ~/.profile + ``` +5. Which of the following directories is not part of the PATH variable? + ``` + /opt/caleston-code + ``` +6. Set an alias called **`up`** for the command **`uptime`** and make it persistent by adding to **`~/.profile`** file. + ``` + echo alias up=uptime >> ~/.profile + ``` +7. Update Bob's prompt so that it displays the date as per the format below: +Example: **`[Wed Apr 22]bob@caleston-lp10:~$`** +Make sure the change is made persistent. + ``` + PS1='[\d]\u@\h:\w\$' + or + echo 'PS1=[\d]\u@\h:\w$' >> ~/.profile + ``` \ No newline at end of file