1. arch
arch [option]
--help ,显示帮助并且退出
--version,显示版本信息并且退出
举例:xxx@xxx-VirtualBox:~$ arch
x86_64
2. uname ,输出当前系统信息
uname [option]
-a,--all 输出所有下表列出的信息,
-s,--kernel-name 输出kernel名
-n,--nodename 输出网络节点的主机名
-r,--kernel-release 输出kernel release
-v, --kernel-version 输出kernelbanben
-m,--machine 输出设备硬件名称
-p,--processor 输出处理器类型
-i,--hardware-platform 输出硬件平台类型
-o,--operating-system 输出操作系统
--help 输出帮助信息并且退出
--version 输出版本信息并且退出
举例
xxx@xxx-VirtualBox:~$ uname -s
Linux
xxx@xxx-VirtualBox:~$ uname -n
xxx-VirtualBox
xxx@xxx-VirtualBox:~$ uname -r
4.13.0-45-generic
xxx@xxx-VirtualBox:~$ uname -v
#50~16.04.1-Ubuntu SMP Wed May 30 11:18:27 UTC 2018
xxx@xxx-VirtualBox:~$ uname -m
x86_64
xxx@xxx-VirtualBox:~$ uname -p
x86_64
xxx@xxx-VirtualBox:~$ uname -i
x86_64
xxx@xxx-VirtualBox:~$ uname -o
GNU/Linux
3. dmidecode -q 显示硬件系统部件
举例:
xxx@xxx-VirtualBox:~$ sudo dmidecode -q
BIOS Information
Vendor: innotek GmbH
Version: VirtualBox
Release Date: 12/01/2006
Address: 0xE0000
Runtime Size: 128 kB
ROM Size: 128 kB
Characteristics:
ISA is supported
PCI is supported
Boot from CD is supported
Selectable boot is supported
8042 keyboard services are supported (int 9h)
CGA/mono video services are supported (int 10h)
ACPI is supported
System Information
Manufacturer: innotek GmbH
Product Name: VirtualBox
Version: 1.2
Serial Number: 0
UUID: D157904D-4C3A-42F9-B1DB-E094E659EBF3
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: Virtual Machine
Base Board Information
Manufacturer: Oracle Corporation
Product Name: VirtualBox
Version: 1.2
Serial Number: 0
Asset Tag: Not Specified
Features:
Board is a hosting board
Location In Chassis: Not Specified
Type: Motherboard
Chassis Information
Manufacturer: Oracle Corporation
Type: Other
Lock: Not Present
Version: Not Specified
Serial Number: Not Specified
Asset Tag: Not Specified
Boot-up State: Safe
Power Supply State: Safe
Thermal State: Safe
Security Status: None
OEM Strings
String 1: vboxVer_5.1.30
String 2: vboxRev_118389
4. hdparm -i /dev/hda 罗列一个磁盘的架构特性
xxx@xxx-VirtualBox:~$ sudo hdparm -i /dev/sda
/dev/sda:
Model=VBOX HARDDISK, FwRev=1.0, SerialNo=VBc27a6dcd-486ae1a3
Config={ Fixed }
RawCHS=16383/16/63, TrkSize=0, SectSize=512, ECCbytes=0
BuffType=DualPortCache, BuffSize=256kB, MaxMultSect=128, MultSect=128
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=83886080
IORDY=yes, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6
AdvancedPM=no WriteCache=enabled
Drive conforms to: unknown: ATA/ATAPI-1,2,3,4,5,6
* signifies the current active mode
5. hdparm -tT /dev/sda 在磁盘上执行测试性读取操作
xxx@xxx-VirtualBox:~$ sudo hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 22096 MB in 1.98 seconds = 11171.66 MB/sec
Timing buffered disk reads: 572 MB in 3.03 seconds = 188.65 MB/sec
6. cat /proc/cpuinfo 显示CPU info 信息
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 94
model name : Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
stepping : 3
cpu MHz : 2591.996
cache size : 6144 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid pni pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx rdrand hypervisor lahf_lm abm 3dnowprefetch pti retpoline rsb_ctxsw rdseed clflushopt
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
bogomips : 5183.99
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:
7.cat /proc/interrupts 显示中断
CPU0
0: 32 IO-APIC 2-edge timer
1: 929 IO-APIC 1-edge i8042
8: 0 IO-APIC 8-edge rtc0
9: 0 IO-APIC 9-fasteoi acpi
12: 808 IO-APIC 12-edge i8042
14: 0 IO-APIC 14-edge ata_piix
15: 2725 IO-APIC 15-edge ata_piix
18: 22 IO-APIC 18-fasteoi vboxvideo
19: 2229 IO-APIC 19-fasteoi enp0s3
20: 7817 IO-APIC 20-fasteoi vboxguest
21: 13955 IO-APIC 21-fasteoi ahci[0000:00:0d.0], snd_intel8x0
22: 31 IO-APIC 22-fasteoi ohci_hcd:usb1
NMI: 0 Non-maskable interrupts
LOC: 204803 Local timer interrupts
SPU: 0 Spurious interrupts
PMI: 0 Performance monitoring interrupts
IWI: 0 IRQ work interrupts
RTR: 0 APIC ICR read retries
RES: 0 Rescheduling interrupts
CAL: 0 Function call interrupts
TLB: 0 TLB shootdowns
TRM: 0 Thermal event interrupts
THR: 0 Threshold APIC interrupts
DFR: 0 Deferred Error APIC interrupts
MCE: 0 Machine check exceptions
MCP: 9 Machine check polls
ERR: 0
MIS: 0
PIN: 0 Posted-interrupt notification event
NPI: 0 Nested posted-interrupt event
PIW: 0 Posted-interrupt wakeup event
8. cat /proc/meminfo 显示内存使用
MemTotal: 2041560 kB
MemFree: 944864 kB
MemAvailable: 1271236 kB
Buffers: 46392 kB
Cached: 405760 kB
SwapCached: 0 kB
Active: 745164 kB
Inactive: 237460 kB
Active(anon): 531384 kB
Inactive(anon): 10272 kB
Active(file): 213780 kB
Inactive(file): 227188 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 2095100 kB
SwapFree: 2095100 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 530512 kB
Mapped: 183984 kB
Shmem: 11188 kB
Slab: 55004 kB
SReclaimable: 33984 kB
SUnreclaim: 21020 kB
KernelStack: 5692 kB
PageTables: 26156 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 3115880 kB
Committed_AS: 3080672 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 88000 kB
DirectMap2M: 2009088 kB
9. cat /proc/swaps 显示哪些swap被使用
Filename Type Size Used Priority
/dev/sda5 partition 2095100 0 -1
10 。 cat /proc/version ,显示内核版本
Linux version 4.13.0-45-generic (buildd@lgw01-amd64-011) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)) #50~16.04.1-Ubuntu SMP Wed May 30 11:18:27 UTC 2018
11. cat /proc/net/dev, 显示网络适配器及统计
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
lo: 3392 40 0 0 0 0 0 0 3392 40 0 0 0 0 0 0
enp0s3: 85510 1016 0 0 0 0 0 315 12420 118 0 0 0 0 0 0
12. cat /proc/mounts 显示已加载的文件系统·
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=994236k,nr_inodes=248559,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=204156k,mode=755 0 0
/dev/sda1 / ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/rdma cgroup rw,nosuid,nodev,noexec,relatime,rdma 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=12053 0 0
mqueue /dev/mqueue mqueue rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0
sunrpc /run/rpc_pipefs rpc_pipefs rw,relatime 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=204156k,mode=700,uid=1000,gid=1000 0 0
gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
/dev/sr0 /media/cheng/VBOXADDITIONS_5.1.30_118389 iso9660 ro,nosuid,nodev,relatime,nojoliet,check=s,map=n,blocksize=2048,uid=1000,gid=1000,dmode=500,fmode=400 0 0
13.lspci -tv 罗列PCI设备
-[0000:00]-+-00.0 Intel Corporation 440FX - 82441FX PMC [Natoma]
+-01.0 Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
+-01.1 Intel Corporation 82371AB/EB/MB PIIX4 IDE
+-02.0 InnoTek Systemberatung GmbH VirtualBox Graphics Adapter
+-03.0 Intel Corporation 82540EM Gigabit Ethernet Controller
+-04.0 InnoTek Systemberatung GmbH VirtualBox Guest Service
+-05.0 Intel Corporation 82801AA AC'97 Audio Controller
+-06.0 Apple Inc. KeyLargo/Intrepid USB
+-07.0 Intel Corporation 82371AB/EB/MB PIIX4 ACPI
\-0d.0 Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode]
14. lsusb -tv 显示USB设备
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/12p, 12M
|__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
15. date 显示系统日期
16 cal 2018 显示2018的日历
17 date 061420542018.00 设置日期和时间----月日时分年.秒
18.clock -w 将时间修改保存到BIOS