-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathlinux-basics.txt
More file actions
103 lines (68 loc) · 1.45 KB
/
linux-basics.txt
File metadata and controls
103 lines (68 loc) · 1.45 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
touch file-name
rm
cp
mv
/ -> home/
rama/
raju/
ramesh/
rwn0517/
etc/
boot/
opt/
bin/ , sbin/
pwd
cd /
Editor : Create data/ Update data/ Delete data/ manuplate data
vi / nano / emacs
vi editor:
vim editor:
vim newfile
vim existingfile
ESC:
Copy yy
paste. p
Undo : u
Copy Multiple Lines
paste Multiple Lines
Delete a line
Delete Multiple Lines
Colon :
:w -> save
:q -> quit
:wq -> save and quit
:q! -> quit without saving
:/word -> search a word
:%s/word1/word2/ -> Search and replace
------------------------------------------
Deal with system services on RedHAT Family 7:
-------------------------
Ex: Taking mariadb as an example
Start the service
# systemctl start mariadb
Stop the service
# systemctl stop mariadb
Restart the service
# systemctl restart mariadb
Status of the service
# systemctl status mariadb
To start the service while system reboot.
# systemctl enable mariadb
To not start a service while system reboots.
# systemctl disable mariadb
------------------------------------------
Deal with system services on RedHAT Family <6:
-------------------------
Ex: Taking mariadb as an example
Start the service
# service mariadb start
Stop the service
# service mariadb stop
Restart the service
# service mariadb restart
Status of the service
# service mariadb status
To start the service while system reboot.
# chkconfig mariadb on
To not start a service while system reboots.
# chkconfig mariadb off