-
Notifications
You must be signed in to change notification settings - Fork 1
/
Lab - Lec2.txt
63 lines (48 loc) · 1.62 KB
/
Lab - Lec2.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
1. Using vi write your CV in the file mycv. Your CV should include your name, age, school, college, experience,...
marwantukhta@DESKTOP-V3J3G7A:~$ vim mycv
marwantukhta@DESKTOP-V3J3G7A:~$ cat mycv
Name: Marwan Tukhta
Age: 23
School: Ibin Khaldoon high school
College: Yanbu University College
Experince:
Software Engineer - Site Reliability
Mrsool
1/2022 - present
Full Stack Software Engineer
Sanam company for business services
1/2021 - 1/2022
2. Open mycv file using vi command then: Without using arrows state how to:
a. Move the cursor down one line at time.
pressing j
b. Move the cursor up one line at time.
pressing k
c. Search for word age
/age
d. Step to line 5 (assuming that you are in line 1 and file is more than 5 lines).
:5
e. Delete the line you are on and line 5.
:d | 5d
f. How to step to the end of line and change to writing mode in one-step.
$ | a
3. List the available shells in your system.
cat /etc/shells
4. List the environment variables in your current shell.
env
5. List all of the environment variables for the bash shell.
printenv
6. What are the commands that list the value of a specific variable?
printenv PATH
7. Display your current shell name.
echo $SHELL
8. State the initialization files of: sh, ksh, bash.
sh = .profile
bash = .bashrc
ksh = .kshrc
9. Edit in your profile to display date at login and change your prompt permanently.
step 1: nano .bashrc
step 2: at the end of the file write:
date
export PS1="Tukhta$ "
10. Create a Bash shell alias named ls for the “ls –l” command.
alias ls="ls -l"