명령어 | 설명 |
lscpu | CPU 하드웨어 정보를 확인하는 명령어 코어개수: $ cat /proc/cpuinfo | grep processor | wc -l |
lshw | 하드웨어 구성 정보를 제한적으로 확인하는 명령어 예) $ sudo lshw -class processor |
hwinfo | 하드웨어 구성(components) 정보를 확인하는 명령어 명령어를 찾을 수 없는 경우: $ sudo apt install hwinfo -y |
lsusb | USB 정보를 확인하는 명령어 |
lspci | PCI 슬롯 정보를 확인하는 명령어 |
du, df | 디스크 사용량, 디스크 남은 용량을 확인하는 명령어 |
free | 메모리 용량을 확인하는 명령어 |
uname | 커널 및 시스템 정보를 확인하는 명령어 |
lsb_release -a | 리눅스 배포판 버전을 확인하는 명령어 명령어를 찾을 수 없는 경우: $ sudo apt install lsb -y 배포 버전(OS) 확인할 수 있는 다른 방법 $ cat /etc/issue $ cat /etc/os-release $ hostnamectl |
nproc | 사용가능한 프로세스 유닛 개수 |
dmesg |
시스템이 부팅할 때 출력하는 로그 정보 확인하기 위해 사용하는 명령어 예) $ dmesg | grep "CPU" |
hostnamectl |
커널 및 시스템 정보 확인하는 명령어 |
CPU 정보 출력하는 명령어 : lscpu
$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 39 bits physical, 48 bits virtual
CPU(s): 12
On-line CPU(s) list: 0-11
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 158
Model name: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Stepping: 10
CPU MHz: 1130.912
CPU max MHz: 4100.0000
CPU min MHz: 800.0000
BogoMIPS: 4399.99
Virtualization: VT-x
L1d cache: 192 KiB
L1i cache: 192 KiB
L2 cache: 1.5 MiB
L3 cache: 9 MiB
NUMA node0 CPU(s): 0-11
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Vulnerability Mds: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP conditional, RS
B filling
Vulnerability Srbds: Mitigation; Microcode
Vulnerability Tsx async abort: Not affected
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36
clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtsc
p lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nons
top_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2
ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt ts
c_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpu
id_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi fle
xpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms i
nvpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 x
saves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_c
lear flush_l1d
"cat /proc/cpuinfo" 명령어로도 동일한 결과를 확인할 수 있습니다.
하드웨어 정보 확인하는 명령어 : lshw
$ sudo lshw -short
H/W path Device Class Description
=============================================================
system 81LB (LENOVO_MT_81LB_BU_idea_FM_Legion Y530-15ICH-1060)
/0 bus LNVNB161216
/0/0 memory 128KiB BIOS
/0/4 processor Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
/0/4/5 memory 384KiB L1 캐시
/0/4/6 memory 1536KiB L2 캐시
/0/4/7 memory 9MiB L3 캐시
/0/25 memory 16GiB System Memory
/0/25/0 memory 8GiB SODIMM DDR4 동기 2400 MHz (0.4 ns)
/0/25/1 memory 8GiB SODIMM DDR4 동기 2400 MHz (0.4 ns)
/0/100 bridge 8th Gen Core Processor Host Bridge/DRAM Registers
/0/100/1 bridge Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe
/0/100/1/0 display GP106M [GeForce GTX 1060 Mobile]
/0/100/1/0.1 multimedia GP106 High Definition Audio Controller
/0/100/2 display UHD Graphics 630 (Mobile)
/0/100/4 generic Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Therm
/0/100/8 generic Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core
/0/100/12 generic Cannon Lake PCH Thermal Controller
/0/100/14 bus Cannon Lake PCH USB 3.1 xHCI Host Controller
/0/100/14/0 usb1 bus xHCI Host Controller
/0/100/14/0/1 input USB Receiver
/0/100/14/0/6 multimedia Integrated Camera
/0/100/14/0/e communication Bluetooth Radio
/0/100/14/1 usb2 bus xHCI Host Controller
/0/100/14.2 memory RAM memory
/0/100/15 bus Cannon Lake PCH Serial IO I2C Controller #0
/0/100/15.1 bus Cannon Lake PCH Serial IO I2C Controller #1
/0/100/16 communication Cannon Lake PCH HECI Controller
/0/100/17 storage Cannon Lake Mobile PCH SATA AHCI Controller
/0/100/1d bridge Cannon Lake PCH PCI Express Root Port #9
/0/100/1d/0 storage Sandisk Corp
/0/100/1d/0/0 /dev/nvme0 storage WDC PC SN520 SDAPMUW-512G-1101
/0/100/1d/0/0/1 /dev/nvme0n1 disk 512GB NVMe namespace
/0/100/1d/0/0/1/1 /dev/nvme0n1p1 volume 449MiB Windows NTFS volume
/0/100/1d/0/0/1/2 /dev/nvme0n1p2 volume 99MiB Windows FAT volume
/0/100/1d/0/0/1/3 /dev/nvme0n1p3 volume 15MiB reserved partition
/0/100/1d/0/0/1/4 /dev/nvme0n1p4 volume 275GiB Windows NTFS volume
/0/100/1d/0/0/1/5 /dev/nvme0n1p5 volume 556MiB Windows NTFS volume
/0/100/1d/0/0/1/6 /dev/nvme0n1p6 volume 200GiB EXT4 volume
/0/100/1d.4 bridge Cannon Lake PCH PCI Express Root Port #13
/0/100/1d.4/0 wlp7s0 network RTL8822BE 802.11a/b/g/n/ac WiFi adapter
/0/100/1d.5 bridge Cannon Lake PCH PCI Express Root Port #14
/0/100/1d.5/0 enp8s0 network RTL8111/8168/8411 PCI Express Gigabit Ethernet Controll
/0/100/1e communication Cannon Lake PCH Serial IO UART Host Controller
/0/100/1f bridge HM470 Chipset LPC/eSPI Controller
/0/100/1f.3 multimedia Cannon Lake PCH cAVS
/0/100/1f.4 bus Cannon Lake PCH SMBus Controller
/0/100/1f.5 bus Cannon Lake PCH SPI Controller
/0/1 system PnP device PNP0c02
/0/2 system PnP device PNP0c02
/0/3 system PnP device PNP0c02
/0/5 system PnP device PNP0c02
/0/6 system PnP device PNP0b00
/0/7 generic PnP device INT3f0d
/0/8 input PnP device PNP0303
/0/9 system PnP device PNP0c02
/0/a system PnP device PNP0c02
/0/b scsi4 storage
/0/b/0.0.0 /dev/sda disk 2TB ST2000LM007-1R81
/0/b/0.0.0/1 /dev/sda1 volume 127MiB reserved partition
/0/b/0.0.0/2 /dev/sda2 volume 1362GiB Windows NTFS volume
/0/b/0.0.0/3 /dev/sda3 volume 500GiB EXT4 volume
/1 power CRB Battery 0
/2 power OEM Define 5
하드웨어 정보 확인하는 명령어 : hwinfo
$ hwinfo --short
cpu:
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 2200 MHz
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 2200 MHz
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 2200 MHz
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 2200 MHz
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 2200 MHz
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 2200 MHz
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 2200 MHz
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 2200 MHz
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 2200 MHz
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 2200 MHz
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 3850 MHz
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 2200 MHz
keyboard:
Logitech Unifying Receiver
/dev/input/event3 AT Translated Set 2 keyboard
mouse:
Logitech Unifying Receiver
/dev/input/mice ELAN061B:00 04F3:309E Mouse
/dev/input/mice ELAN061B:00 04F3:309E Touchpad
monitor:
BOE CQ LCD Monitor
graphics card:
nVidia GP106M [GeForce GTX 1060 Mobile]
Intel UHD Graphics 630 (Mobile)
sound:
Intel Cannon Lake PCH cAVS
nVidia GP106 High Definition Audio Controller
storage:
Intel Cannon Lake Mobile PCH SATA AHCI Controller
Sandisk Non-Volatile memory controller
network:
enp8s0 Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
wlp7s0 Realtek RTL8822BE 802.11a/b/g/n/ac WiFi adapter
network interface:
lo Loopback network interface
enp8s0 Ethernet network interface
wlp7s0 Ethernet network interface
disk:
/dev/nvme0n1 Sandisk Disk
/dev/sda ST2000LM007-1R81
USB 정보 확인하기 : lsusb
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04ca:7070 Lite-On Technology Corp. Integrated Camera
Bus 001 Device 004: ID 0bda:b023 Realtek Semiconductor Corp. Bluetooth Radio
Bus 001 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
디스크 사용량 확인하기 : df
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.8G 0 7.8G 0% /dev
tmpfs 1.6G 2.4M 1.6G 1% /run
/dev/nvme0n1p6 196G 52G 135G 28% /
tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/loop0 128K 128K 0 100% /snap/bare/5
/dev/loop3 45M 45M 0 100% /snap/snapd/15314
/dev/loop1 111M 111M 0 100% /snap/core/12834
/dev/loop2 249M 249M 0 100% /snap/gnome-3-38-2004/99
/dev/loop6 62M 62M 0 100% /snap/core20/1405
/dev/loop7 248M 248M 0 100% /snap/gnome-3-38-2004/87
/dev/loop4 4.3M 4.3M 0 100% /snap/tree/18
/dev/loop5 112M 112M 0 100% /snap/core/12941
/dev/loop8 165M 165M 0 100% /snap/gnome-3-28-1804/161
/dev/loop9 219M 219M 0 100% /snap/gnome-3-34-1804/77
/dev/loop10 62M 62M 0 100% /snap/core20/1376
/dev/loop11 51M 51M 0 100% /snap/snap-store/547
/dev/loop12 56M 56M 0 100% /snap/core18/2284
/dev/loop13 56M 56M 0 100% /snap/core18/2344
/dev/loop14 219M 219M 0 100% /snap/gnome-3-34-1804/72
/dev/loop15 95M 95M 0 100% /snap/slack/60
/dev/loop16 250M 250M 0 100% /snap/zoom-client/168
/dev/loop17 104M 104M 0 100% /snap/slack/61
/dev/loop18 251M 251M 0 100% /snap/zoom-client/170
/dev/loop19 65M 65M 0 100% /snap/netflix-web/1
/dev/loop20 296M 296M 0 100% /snap/vlc/2344
/dev/loop21 55M 55M 0 100% /snap/snap-store/558
/dev/loop22 66M 66M 0 100% /snap/gtk-common-themes/1519
/dev/loop23 66M 66M 0 100% /snap/gtk-common-themes/1515
/dev/loop24 44M 44M 0 100% /snap/snapd/15177
/dev/nvme0n1p2 96M 31M 66M 32% /boot/efi
tmpfs 1.6G 20K 1.6G 1% /run/user/125
tmpfs 1.6G 64K 1.6G 1% /run/user/1000
"df -h /" 옵션은 전체 사용량과 남은 용량을 한 줄로 표시해 줍니다.
사용 중인 메모리 확인하기: free
$ free -m
total used free shared buff/cache available
Mem: 15874 2839 10434 111 2600 12619
스왑: 2047 0 2047
$
$ free -h
total used free shared buff/cache available
Mem: 15Gi 3.0Gi 9Gi 125Mi 2.6Gi 12Gi
스왑: 2.0Gi 0B 2.0Gi
메모리 전체 용량은 "cat /proc/meminfo | grep MemTotal" 명령어로도 확인이 가능합니다.
Options : free [option]
Option | Description | |
-b | --bytes | show output in bytes |
-k | --kibi | show output in kibibytes |
-m | --mebi | show output in mebibytes |
-g | --gibi | show output in gibibytes |
-h | --human | show human-readable output |
물리적인 메모리 정보는 "cat /proc/meminfo" 혹은 "$ dmidecode --type memory" 명령어로 확인할 수 있습니다.
커널 및 시스템 정보 : uname
시스템과 리눅스 커널과 관련된 정보를 확인할 때 사용하는 명령어 입니다.
$ uname -a
Linux admapserver 5.13.0-40-generic #45~20.04.1-Ubuntu SMP Mon Apr 4 09:38:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Options : uname [option]
Option | Description | |
-a | --all | 모든 시스템 정보 출력 |
-s | --kernel-name | 커널 이름 출력 |
-n | --nodename | 네트워크 호스트 네임 출력 |
-r | --kernel-release | 커널의 릴리스 버전 출력 |
-v | --kernel-version | 커널 버전 출력 |
-m | --machine | 시스템의 하드웨어 아키텍처 출력 |
-p | --processor | 프로세서 타입 출력 |
-i | --hardware-platform | 하드웨어 플랫폼 정보 출력 |
-o | --operating-system | 운영체제 이름 출력 |
시스템 정보 확인: hostnamectl
$ hostnamectl
Static hostname: admapserver
Pretty hostname: ADMapServer
Icon name: computer-laptop
Chassis: laptop
Machine ID: 1101a2d6c0a64774bd021fa3d71a760f
Boot ID: e6cdfc55726045fab1e932e9b5e86fef
Operating System: Ubuntu 20.04.5 LTS
Kernel: Linux 5.15.0-48-generic
Architecture: x86-64
리눅스 배포판 버전 확인 : lsb_release
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
$
$ cat /etc/issue
Ubuntu 20.04.4 LTS \n \l
참고 사이트
Linux - Hardware 정보를 보여주는 명령어 : https://codechacha.com/ko/linux-hardware-info/
'Linux > Linux Shell Command' 카테고리의 다른 글
ulimit - 리눅스에서 자원(리소스)의 제한 설정 관련 명령어 (0) | 2022.04.26 |
---|---|
sysctl 명령어 (0) | 2022.04.24 |
파일/디렉토리 복사 (0) | 2022.04.14 |
df - 디스크 남은 용량 확인하기 (0) | 2022.04.14 |
zsh 설치하기 - 리눅스 쉘(Shell)을 예쁘고 고급스럽게 (0) | 2022.04.08 |