Skip to content

Commit e4756c4

Browse files
authored
Merge pull request kodekloudhub#13 from akshayithape-devops/development
Update 01-Introduction-to-Shell.md
2 parents d9c85bc + 2a06e32 commit e4756c4

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

docs/02-Working-With-Shell-Part-I/01-Introduction-to-Shell.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ In this section, we will take a look at linux shell in detail.
1414
![Shell](../../images/Shell.PNG)
1515

1616
- This command line interface (CLI) will enable you to effectively work on linux laptop/server/virtual machine.
17-
- While the graphical version may see more appealing to the users but can be limited in case of functionality. These is where the Linux command line ccommonly known as **`Linux Shell`** shines.
17+
- While the graphical version may see more appealing to the users but can be limited in case of functionality. These is where the Linux command line commonly known as **`Linux Shell`** shines.
1818

1919
#### What is a shell?
2020

docs/02-Working-With-Shell-Part-I/02-Basic-Commands.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ $ cd
5656
5757
![Absolute_and_relative_path_working_with_shell_I](../../images/Absolute_and_relative_path_working_with_shell_I.PNG)
5858
59+
**Difference Between Absolute and Relative Path**
60+
61+
- **Absolute Path** : An absolute path is defined as specifying the location of a file or directory from the root directory(/).
62+
- **Relative Path** : Relative path is defined as the path related to the present working directly(pwd).
5963
6064
To change to a directory with absolute path. Run **`cd <directory_path>`**
6165
```
@@ -121,7 +125,7 @@ $ cp -r Europe/UK Europe/UnitedKingdom
121125
122126
To print the content of a file. Run **`cat /path/to/<filename>`** command
123127
```
124-
$cat Asia/India/Mumbai/City.txt
128+
$ cat Asia/India/Mumbai/City.txt
125129
```
126130
127131
To add a content to a file with cat(redirect) . Run **`cat > /path/to/<filename>`** command

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

+26-4
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)