From ba35e4e1c4fa2eb02710db4251c62384e7c01297 Mon Sep 17 00:00:00 2001 From: Akshay Ithape Date: Sat, 8 May 2021 19:28:14 +0530 Subject: [PATCH 1/4] Fixed the typo --- docs/02-Working-With-Shell-Part-I/01-Introduction-to-Shell.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/02-Working-With-Shell-Part-I/01-Introduction-to-Shell.md b/docs/02-Working-With-Shell-Part-I/01-Introduction-to-Shell.md index cb6b17a..f8b75ad 100644 --- a/docs/02-Working-With-Shell-Part-I/01-Introduction-to-Shell.md +++ b/docs/02-Working-With-Shell-Part-I/01-Introduction-to-Shell.md @@ -14,7 +14,7 @@ In this section, we will take a look at linux shell in detail. ![Shell](../../images/Shell.PNG) - This command line interface (CLI) will enable you to effectively work on linux laptop/server/virtual machine. -- 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. +- 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. #### What is a shell? From d679098adbc5823316b541804215f57982fd7be0 Mon Sep 17 00:00:00 2001 From: Akshay Ithape Date: Sat, 8 May 2021 20:51:22 +0530 Subject: [PATCH 2/4] Fixed the typo --- docs/02-Working-With-Shell-Part-I/02-Basic-Commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/02-Working-With-Shell-Part-I/02-Basic-Commands.md b/docs/02-Working-With-Shell-Part-I/02-Basic-Commands.md index b417de6..68dfc8c 100644 --- a/docs/02-Working-With-Shell-Part-I/02-Basic-Commands.md +++ b/docs/02-Working-With-Shell-Part-I/02-Basic-Commands.md @@ -121,7 +121,7 @@ $ cp -r Europe/UK Europe/UnitedKingdom To print the content of a file. Run **`cat /path/to/`** command ``` -$cat Asia/India/Mumbai/City.txt +$ cat Asia/India/Mumbai/City.txt ``` To add a content to a file with cat(redirect) . Run **`cat > /path/to/`** command From c37460625b4d91a03831b3d68d44f29ecb427792 Mon Sep 17 00:00:00 2001 From: Akshay Ithape Date: Sat, 8 May 2021 21:04:14 +0530 Subject: [PATCH 3/4] Added explanation about absolute and relative path --- docs/02-Working-With-Shell-Part-I/02-Basic-Commands.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/02-Working-With-Shell-Part-I/02-Basic-Commands.md b/docs/02-Working-With-Shell-Part-I/02-Basic-Commands.md index 68dfc8c..d25ed48 100644 --- a/docs/02-Working-With-Shell-Part-I/02-Basic-Commands.md +++ b/docs/02-Working-With-Shell-Part-I/02-Basic-Commands.md @@ -56,6 +56,10 @@ $ cd ![Absolute_and_relative_path_working_with_shell_I](../../images/Absolute_and_relative_path_working_with_shell_I.PNG) +**Difference Between Absolute and Relative Path** + +- **Absolute Path** : An absolute path is defined as specifying the location of a file or directory from the root directory(/). +- **Relative Path** : Relative path is defined as the path related to the present working directly(pwd). To change to a directory with absolute path. Run **`cd `** ``` From 2a06e320932c3064e9325e866c8d00bfc44951b9 Mon Sep 17 00:00:00 2001 From: Akshay Ithape Date: Sat, 8 May 2021 22:35:32 +0530 Subject: [PATCH 4/4] 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