linux查看关键信息以及修改关键信息
[root@control ~]# cat /etc/redhat-release Red Hat Enterprise Linux release 8.2 (Ootpa)
查看CPU
[root@control ~]# lscpu 架构: x86_64 CPU 运行模式: 32-bit, 64-bit 字节序: Little Endian CPU: 1 在线 CPU 列表: 0 每个核的线程数: 1 每个座的核数: 1 座: 1 NUMA 节点: 1 厂商 ID: GenuineIntel CPU 系列: 6 型号: 60 型号名称: Intel(R) Core(TM) i3-4160 CPU @ 3.60GHz 步进: 3 CPU MHz: 3591.729 BogoMIPS: 7183.45 超管理器厂商: VMware 虚拟化类型: 完全 L1d 缓存: 32K L1i 缓存: 32K L2 缓存: 256K L3 缓存: 3072K NUMA 节点0 CPU: 0 标记: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cpuid_fault epb pti fsgsbase smep xsaveopt dtherm arat pln pts
查看内存
[root@control ~]# cat /proc/meminfo MemTotal: 824076 kB MemFree: 334224 kB MemAvailable: 463316 kB Buffers: 3196 kB Cached: 219084 kB SwapCached: 0 kB Active: 182032 kB Inactive: 133684 kB Active(anon): 94832 kB Inactive(anon): 4440 kB Active(file): 87200 kB Inactive(file): 129244 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 2097148 kB SwapFree: 2097148 kB Dirty: 0 kB Writeback: 0 kB AnonPages: 93476 kB Mapped: 80972 kB Shmem: 5836 kB KReclaimable: 46660 kB Slab: 104668 kB SReclaimable: 46660 kB SUnreclaim: 58008 kB KernelStack: 3340 kB PageTables: 6172 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 2509184 kB Committed_AS: 314180 kB VmallocTotal: 34359738367 kB VmallocUsed: 0 kB VmallocChunk: 0 kB Percpu: 22784 kB HardwareCorrupted: 0 kB AnonHugePages: 28672 kB ShmemHugePages: 0 kB ShmemPmdMapped: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB Hugetlb: 0 kB DirectMap4k: 110464 kB DirectMap2M: 937984 kB DirectMap1G: 0 kB [root@control ~]# free -m total used free shared buff/cache available Mem: 804 215 326 5 262 452 Swap: 2047 0 2047
查看主机名
[root@control ~]# hostname control [root@control ~]# hostname control1 # 临时修改 [root@control ~]# echo "control1" > /etc/hostname # 永久修改
查看IP信息
[root@control ~]# ifconfig [root@control ~]# ip address show [root@control ~]# ip a s
查看内核版本
[root@control ~]# uname -a Linux control 4.18.0-193.el8.x86_64 #1 SMP Fri Mar 27 14:35:58 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux [root@control ~]# uname -v # 内核版本 #1 SMP Fri Mar 27 14:35:58 UTC 2020 [root@control ~]# uname -s # 系统名 Linux [root@control ~]# uname -r # 操作系统的发行版号 4.18.0-193.el8.x86_64 [root@control ~]# uname -p # 系统处理器的体系结构 x86_64 [root@control ~]# uname -o # 操作系统 GNU/Linux [root@control ~]# uname -n # 节点名称 control [root@control ~]# uname -m # 机器硬件(CPU)名 x86_64 [root@control ~]# uname -i # 硬件平台 x86_64
查看设备挂载信息
[root@control zhu]# df -h 文件系统 容量 已用 可用 已用% 挂载点 devtmpfs 386M 0 386M 0% /dev tmpfs 403M 0 403M 0% /dev/shm tmpfs 403M 5.7M 397M 2% /run tmpfs 403M 0 403M 0% /sys/fs/cgroup /dev/mapper/rhel-root 17G 1.8G 16G 11% / /dev/sr0 7.9G 7.9G 0 100% /dvd /dev/sda1 1014M 179M 836M 18% /boot tmpfs 81M 0 81M 0% /run/user/0
点赞
评论