-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinuxlab231.txt
More file actions
44 lines (41 loc) · 1.21 KB
/
linuxlab231.txt
File metadata and controls
44 lines (41 loc) · 1.21 KB
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
Task 1: Connect to linux
ssh -i file.pem user@ipaddress
yes if prompted
Task 2: Exercise run vim tutorial
sudo yum install vim
vimtutor
lesson 1.1: navigation
- moving with h(left), j(down), k(up) and l(right)
Lesson 1.2: quitiing
- esc will put you in normal mode
- :q! and enter will quit, discarding any changes
Lesson 1.3: text editing - deleting
edit the file by deleting additional characters with x (outside of edit mode)
lesson 1.4: text editing - insertion
enter edit mode with i
add text required
exit edit mode with esc
lesson 1.5: text editing - appending
enter edit mode with a
add text required
exit edit mode with esc
Lesson 1.6: Editing a file
enter: vim file.txt
enter details
save and quit using command :wq
Task 3: Edit a file in vim (essentially lesson 1.6 in vimtutor)
vim helloworld
'Hello World!
This is my first file in linux and I am editing it in vim'
:wq
vim helloworld
'I learnd how to create a file, edit and save them too!
:q!
dd - delete entire line
u - undo last command
:w - save without quitting
Task 4: edit a file in nano
nano cloudworld
'We are using nano this time! We can simply start typing! No insert mode needed.'
ctrl + o and then enter
ctrl + x