![Linux 터미널에서 하드 디스크 정보를 얻는 방법은 무엇입니까? [복사]](https://linux55.com/image/86880/Linux%20%ED%84%B0%EB%AF%B8%EB%84%90%EC%97%90%EC%84%9C%20%ED%95%98%EB%93%9C%20%EB%94%94%EC%8A%A4%ED%81%AC%20%EC%A0%95%EB%B3%B4%EB%A5%BC%20%EC%96%BB%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%80%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F%20%5B%EB%B3%B5%EC%82%AC%5D.png)
명령어를 통해 CPU 정보를 얻을 수 있습니다 lscpu
. Linux 터미널에도 하드 디스크 정보를 얻을 수 있는 비슷한 명령어가 있나요?
답변1
파티션 정보를 찾으려면 fdisk
또는 를 사용할 수 있습니다 parted
.
개별 파티션이 마운트 지점과 어떻게 관련되는지 더 알고 싶다면 lsblk
제가 자주 사용하는 방법을 시도해 보세요.
lsblk -o "NAME,MAJ:MIN,RM,SIZE,RO,FSTYPE,MOUNTPOINT,UUID"
정보가 포함되어 있습니다 UUID
.
마지막으로 smartctl -a /dev/yourdrive
다음과 같은 세부 정보를 제공합니다.
=== START OF INFORMATION SECTION ===
Device Model: WDC WD40EFRX-68WT0N0
Serial Number: WD-WCC4E4LA4965
LU WWN Device Id: 5 0014ee 261ca5a3f
Firmware Version: 82.00A82
User Capacity: 4,000,787,030,016 bytes [4.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-2 (minor revision not indicated)
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sun Apr 3 10:59:55 2016 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
그리고 더.
이러한 명령 중 일부는 모든 정보를 얻으려면 sudo를 실행해야 합니다.
답변2
당신은 그것을 사용할 수 있습니다 lshw
:
sudo lshw -c disk
그러나 최신 커널의 경우 이식 가능하고 안정적인 읽기 방법을 권장합니다 sysfs
.
/sys/block/sd*/device/*
답변3
이미 제안된 방법 외에 시도할 수 있는 또 다른 방법은 다음과 같습니다.
hdparm -I /dev/sda
~에서맨페이지:
DESCRIPTION
hdparm provides a command line interface to various kernel interfaces
supported by the Linux SATA/PATA/SAS "libata" subsystem and the older
IDE driver subsystem. Many newer (2008 and later) USB drive
enclosures now also support "SAT" (SCSI-ATA Command Translation) and
therefore may also work with hdparm. E.g. recent WD "Passport"
models and recent NexStar-3 enclosures. Some options may work
correctly only with the latest kernels.
답변4
다음 명령을 사용할 수 있습니다.
lshw -class disk -class storage