LAB 2
- route
2. Do the same , pressing ENTER after each command
- uptime- ls- date- sync
- sync
4. Now press the up arrow two more times . You should see
First time :
- date
Second time :
- ls
5. Press ENTER , the last command will run again . Pressing ENTER will always run the command shown
PART 2
1. Run a few commands such as
- route- uptime- date- sync
2. Next , run this command
- history
3. Look for a command you would like to run again , but instead of trying the command , type an exclamation point (!) and then the number next to the command as shown in the history listing and press ENTER
- !10
4. That command will run again
PART 3
1. Change to your home directory , in my case it's
- cd /home/rienlinux
2. Create a directory using the following command
- mkdir Linuxbook
3. Change to it Linuxbook using the following command
- cd Linuxbook/
4. In Linuxbook , create 4 files which is File2.txt , File3.txt , File3.txt , File.txt and Unique1.txt
- ls>File2.txt- ls>File3.txt- ls>File4.txt- ls>Unique1.txt
5. Now let's create some dummy files , run using the following command
- ls>File1.txt
6. Type this command and press TAB , the result will in the rest of the filename "Unique1.txt" to appear and press ENTER
- ls -la u
7. Now type this command and press TAB . Nothing will happen and your console may beep . Press Tab again . Now all 4 filenames will appear
- ls -la File
First time :
Second time :
- 4.txt
PART 4
What is PS1 ?
When we open a fresh terminal the first thing that we can see is (rienlinux@kali)-[~] $ . This is the PS1
We can use the export PS1 command to modify how the PS1 would look like in the terminal
Input this command :
- export PS1= "\u \h \w \$"
- echo $PATH- export PATH= ".:$PATH"- echo $PATH
- echo $EDITOR- export EDITOR=/lewis/bin64/kw- echo $EDITOR
PART 5
1. Creating simple command , then ENTER
- tput- alias cls= "tput clear"
2. To show long directory listings , we use this command . Then write la and press ENTER
- alias la= "ls -la"- la
3. To show the current files last we use the command . Then write la and press ENTER
- alias lt= "ls -latr"- la
PART 6
1. Using Ibook in order to open Linuxbook
- alias Ibook= "cd /home/rienlinux/Linuxbook"- Ibook
PART 7
- export Ibook= "/home/rienlinux/Linuxbook"
- alias Ibook= "cd $Ibook"
- Ibook
PART 8
1. Type this command
- cd /tmp- touch F1.txt- cp F1.txt $Ibook- Ibook-ls
Comments
Post a Comment