Linux常用命令学习
whereis :查询命令文件的位置在哪
root@2125192178hax:~# whereis ping
ping: /usr/bin/ping /usr/share/man/man8/ping.8.gz
file:查看文件的类型
root@2125192178hax:~# file /usr/bin/ping
/usr/bin/ping: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=7e20c8bbbcf57159cb93bc4cb3bb5a58978fde5a, for GNU/Linux 3.2.0, stripped
who:查看当前在线的用户
root@2125192178hax:~# who
root pts/0 2022-03-05 23:44 (2001:41d0:8:824f:48:88d7:78a2:1)
root pts/1 2022-03-05 23:44 (2001:41d0:8:824f:48:88d7:78a2:1)
whoami:我是谁,pwd:我在哪里
root@2125192178hax:~# whoami
root
root@2125192178hax:~# pwd
/root
uname -a :查看内核信息
root@2125192178hax:~# uname -a
Linux 2125192178hax.localdomain 5.4.0-29-generic #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
echo :打印语句
root@2125192178hax:~# echo hello
hello
clear:清屏
root@2125192178hax:~# clear
history :查看历史
267 history
268 echo hello
269 clear
270 history
271 ping www.baidu.com
272 ping huya.com
273 history
root@2125192178hax:~#