查看虚拟机系统信息
# 查看硬盘信息
root@bk:~/ckh# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 198.4M 0 rom
vda 254:0 0 100G 0 disk
└─vda1 254:1 0 100G 0 part /
vdb 254:16 0 50G 0 disk
└─vdb1 254:17 0 50G 0 part /mnt/vdb1
# 查看文件系统 ext4 、 xfs
root@bk:~/ckh# blkid
/dev/sr0: BLOCK_SIZE="2048" UUID="2022-11-08-12-19-37-00" LABEL="config-2" TYPE="iso9660"
/dev/vda1: UUID="c0b9ecd8-f922-4e5d-bccb-83fbc94ad23b" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="bcfcb5cb-01"
/dev/vdb1: UUID="da8f59ec-f2dc-4bfb-b658-4fb3e37b0a3d" BLOCK_SIZE="512" TYPE="xfs" PARTUUID="914203f3-4727-044c-8112-bde5e4b9f80f"
# 查看挂载的盘
root@bk:~/ckh# df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.8G 0 3.8G 0% /dev
tmpfs 771M 492K 770M 1% /run
/dev/vda1 99G 46G 49G 49% /
tmpfs 3.8G 24K 3.8G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/vdb1 50G 438M 50G 1% /mnt/vdb1
tmpfs 771M 0 771M 0% /run/user/0
root@bk:~/ckh#
root@bk:~/ckh# ls /mnt/vdb1
p01_bkApi p01_bkApi.zip
# 查看内存
root@bk:~/ckh# free -h
total used free shared buff/cache available
Mem: 7.5Gi 551Mi 4.0Gi 2.0Mi 3.0Gi 6.7Gi
Swap: 0B 0B 0B
# 查看网卡及私网IP地址 eth0
root@bk:~/ckh# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.4.10 netmask 255.255.252.0 broadcast 10.0.7.255
inet6 fe80::5054:ff:feb9:d12d prefixlen 64 scopeid 0x20<link>
ether 52:54:00:b9:d1:2d txqueuelen 1000 (Ethernet)
RX packets 72047112 bytes 13112293224 (12.2 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 69388396 bytes 13075638090 (12.1 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 171450 bytes 180289958 (171.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 171450 bytes 180289958 (171.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
# 查看是否联网 ping
root@bk:~/ckh# ping www.baidu.com
PING www.a.shifen.com (153.3.238.102) 56(84) bytes of data.
64 bytes from 153.3.238.102: icmp_seq=1 ttl=50 time=10.8 ms
64 bytes from 153.3.238.102: icmp_seq=2 ttl=50 time=10.8 ms
64 bytes from 153.3.238.102: icmp_seq=3 ttl=50 time=10.8 ms
^C
--- www.a.shifen.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 10.779/10.801/10.839/0.026 ms
root@bk:~/ckh#
root@bk:~/ckh#
root@bk:~/ckh# ping www.abaidu.com
ping: www.abaidu.com: Temporary failure in name resolution
标签:06,vdb1,查看,bytes,ckh,dev,bk,空间,root
From: https://www.cnblogs.com/ckh2023/p/17745085.html