查看主机IP地址:
1 ip
2 ipconfig
3 ip ls
4 ipconf
5 ifconfig
6 itconfig
7 ifconfig
8 ping
9 ping 192.168.85.128
10 echo $SHELL
11 cat /etc/shells
12 cd /home/
13 q
14 cd
15 cd /home/
16 cd..
17 cd
查看指令ls:
18 ls
19 ls -1
20 ls -l
21 ls /dev/
22 ls /dev/ -l
23 ls -l /dev/
24 pwd
25 hostname
26 uname
27 uname -r
28 uname -n
29 ls /etc/
30 cat /etc/adjtime
31 ls /b
32 ls /boot/
33 ping 127.0.0.1
34 sudo cmd_name
35 cat /etc/shadow
36 sudo cat /etc/shadow
37 sudo can /etc/shadow
38 cat /etc/shadow
39 sudo cat /etc/shadow
40 su
41 exit
42 ls
43 cf - 3
44 exit
45 man
46 man man
47 man sudo
48 man man
49 info
50 info uname
51 q
52 pwd
53 whoami
查看编写记录代码:
54 history
55 history 5
56 ip ls
57 whoami
58 history 5 -r
59 ip ls
60 history 5
61 history 5 -r
62 cf -3
管道用法:
63 ls /dev/ |grep tty |wc -1
64 ls /dev/ |grep tty |wc -l
65 ping 192.168.163.1
66 ping 192.168.56.1
67 history
68 ll
69 cd make
70 ll
71 ls 0319
72 tar -zxvf dir1.tar.gz
73 ls -dir1
74 cd 0319
75 tar -zxvf dir1.tar.gz
76 ls dir1/
77 ls dir1/stdio.h
78 ls dir1/a
解压缩解包命令:
79 tar -zxvf dir2.tar.bz2
80 tar -zcvf dir2.tar.bz2
81 tar -jcvf dir2.tar.bz2
82 ll
83 vim dir1
84 ll
85 ls dir1
使用Vim编辑dir1.tar.gz文件:
86 vim dir1.tar.gz
87 vim dir2.tar.bz2
88 ls -a
89 vim dir1.tar
90 ls .
91 cd ,
92 cd .
93 ll
更改文件权限:(u.g.o)
94 chmod
95 ll
96 chmod -R g+w,o+w dir1.tar
97 ll
98 chmod ugo+x dir2.tar.bz2
99 ll
100 chmod ugo+x,ugo+w dir2.tar.bz2
101 ll
102 chomd 0777 dir1.tar.gz
103 chmod 0777 dir1.tar.gz
104 ll
105 chmod 0000 dir1.tar.gz
106 ll
107 chmod 0007 dir1.tar.gz
108 ll
解压缩解包:
109 tar -jxvf dir2.tar.bz2
110 ll
111 cd dir1/
112 ll
查看指令:
113 ls a
114 ls stdio.h
115 cd
116 ll -a
117 ls-a
118 ls -a
119 cd make/
120 ls -a
121 ls 0319
122 ls 0319.tar.gz
123 vim 0319.tar.gz
124 ll
125 sudo chown root:root g.exe
126 ll
127 ls 0.exe
128 ls o.exe
129 vim 0.exe
130 vim g.exe
131 ls -a
132 rm -rf g.exe
133 rm -rf 0.exe
134 ls -a
135 rm -rf g.exe
136 ls -a
137 rm -f g.exe~
138 ls -a
139 ll
140 vim o.exe
141 cd
142 stat make.txt
143 stat make.exe
144 ll
145 stat make
146 touch xiaomi su7.txt
147 ll
148 cd xiaomi
149 kmdir o
150 ls
151 rm -f su7.txt
152 rm -f xiaomi
153 ll
154 kmdir MI
155 mkdir xiaomi
156 ll
157 cd xiaomi
158 touch su7.exe
159 vim su7.exe
160 touch qirui
161 touch qirui.exe
162 ll
163 rm -f qirui
164 ll
165 cp su7.exe qirui.exe
166 ls qirui.exe
167 vim qirui.exe
168 vim su7.exe
169 cp su7.exe qirui.exe make
170 tuoch jili.exe
171 touch jili.exe
链接(-s创建软链接,快捷方式)
172 in -s qirui.exe jili.exe
173 ln -s qirui.exe jili.exe
174 ln -s qirui.exe jl.exe
175 ll
176 vim jl.exe
177 cp su7.exe jili.exe
178 vim jili.exe
179 history
180 ll
181 ls make/
182 mkdia 1
183 mkdir 1
184 ll
185 mkdir -m 644 2
186 ll
依次创建空目录:
187 mkdir 3 4 5 6
188 ll
遍历创建空目录:
189 mkdir -p 1/2/3/4/5/6/7
查看目录文件:
190 ls -a
191 cd 1
192 ls -a
193 ls -l
194 ls -A
195 ls -a
196 ls -r
197 ls -R
198 ls -d
199 ls -RS
200 ls -i
201 ls -t
202 ls -X
203 ls -m
204 ls -Sl
205 cd
206 ls /etc
切换不同的目录:
207 cd /1
208 cd ./1
209 cd /3
210 ls
211 cd
212 ls
213 cd 3
214 cd 1
215 cd
216 cd 1
217 cd ./2
218 cd ./3/4/5/7
219 cd ./3/4/5
220 cd ../
221 cd ../../../../
222 cd ~
223 cd ..
224 cd -
225 cd /
226 ls
227 cd
创建文件:
228 touch a.exe
229 touch b.exe c.exe
230 ls
移动文件:
231 mv a.exe x.exe
232 ls
233 mv b.exe ./1
234 ls -1
235 cd 1
236 ls -a
237 cd
238 mv 1 ./6/66
239 ls
240 ls -a
241 ls -6
242 cd 6
243 ls -a
244 cd 66
245 ls -a
246 cd ..
247 mv -f ./6/*
248 cd 66
249 mv -f ./6/*
250 ls
251 ls 2
遍历查看删除空文件:
252 rmdir -pv 2/3/4/5/6/7
253 mridr b.exe
254 rmdir b.exe
255 cd ..
256 rmdir 66
257 cd ..
258 ls
259 cd 2
260 cd 3
261 ls -a
262 cd
263 cd 2
264 sudo cd 2
265 cd 2
266 ls -2
267 ls
268 cd 3
269 touch File.txt
270 ls
一次创建多个文件:
271 touch File{1..5}.exe
272 ls
273 touch -d "2024-03-21 21:48" day.exe
274 ll
275 cd ..
删除所有.exe文件
276 rm -rf *.exe
277 rm -rf *.txt
278 cd3
279 cd 3
280 ls -a
删除所有.txt文件
281 rm -rf *.txt
282 rm -rf *.exe
283 ls -a
284 cd ..
查看指定文件内容:
285 cat xiaomi.exe
286 cat qirui.exe
287 crt b.exe
288 cat b
289 cat c.exe
将历史指令输出重定向到mylog.txt文件
290 history > mylog.txt