Skip to content

Commit 2a06e32

Browse files
author
Akshay Ithape
committed
Added 06-Lab-Linux-Bash-Shell
1 parent c374606 commit 2a06e32

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

docs/02-Working-With-Shell-Part-I/06-Lab-Linux-Bash-Shell.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,35 @@
22

33
- Access Hands-On Labs here [Hands-On Labs](https://kodekloud.com/courses/873064/lectures/17074355)
44

5-
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.
5+
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.
66
```
77
$ echo $SHELL
88
```
9-
1. To change the shell for bob from **`Bash`** to **`Bourne Shell`**
9+
2. To change the shell for bob from **`Bash`** to **`Bourne Shell`**
1010
```
1111
$ chsh -s /bin/sh bob
1212
```
13-
14-
13+
3. What is the value of the environment variable **`TERM`**
14+
```
15+
echo $TERM
16+
```
17+
4. Create a new environment variable called **`PROJECT=MERCURY`** and make it persistent by adding the variable to the **`~/.profile`** file.
18+
```
19+
echo export PROJECT=MERCURY >> ~/.profile
20+
```
21+
5. Which of the following directories is not part of the PATH variable?
22+
```
23+
/opt/caleston-code
24+
```
25+
6. Set an alias called **`up`** for the command **`uptime`** and make it persistent by adding to **`~/.profile`** file.
26+
```
27+
echo alias up=uptime >> ~/.profile
28+
```
29+
7. Update Bob's prompt so that it displays the date as per the format below:
30+
Example: **`[Wed Apr 22]bob@caleston-lp10:~$`**
31+
Make sure the change is made persistent.
32+
```
33+
PS1='[\d]\u@\h:\w\$'
34+
or
35+
echo 'PS1=[\d]\u@\h:\w$' >> ~/.profile
36+
```

0 commit comments

Comments
 (0)