hi,
i want to know how to check system spec (command line) in linux like right clicking "my computer" in windows and click on "properties"

some system i know i can do #cat /proc/cpuinfo but how do i check like how much ram the machine has? some system i can't do #cat /proc/cpuinfo even the /proc/cpuinfo exist .. any reason?

in short, i would like to know how to check CPU info, ram info, hard drive info.. thanks for any help. i am using fedora 9 btw

Dani AI

Generated

Short, practical summary that builds on the replies from , and with a few additional, reliable commands and troubleshooting tips you can use from the shell.

For CPU and topology: use a dedicated reader that formats sysfs/proc info (easier than parsing raw files).

lscpu

lscpu reports sockets/cores/threads and cache topology and is designed for this purpose. (man7.org)

For memory: check usable vs. installed memory and the physical modules.

free -h
sudo dmidecode --type memory

free shows total usable memory the kernel sees; dmidecode reads SMBIOS/DMI so it lists the modules the motherboard reports (manufacturer/size/slot), which is helpful when BIOS sees RAM but the OS does not. (man7.org)

For disks and controllers: get a tree of block devices and quick health info, plus PCI/USB device lists.

lsblk -o NAME,SIZE,TYPE,MOUNTPOINT
sudo smartctl -a /dev/sdX    # SMART health (requires smartmontools)
lspci -nnk                   # controllers, drivers
lsusb                        # USB devices

lsblk reads sysfs/udev to show devices and mount points; smartctl queries SMART for drive health. (manpages.debian.org)

Extras and practical notes: lshw (which you found) gives a detailed dump but usually needs root for full output and has a -sanitize option to hide serials; inxi is a single-install script that prints a compact system summary if you want a one-line report. (manpages.debian.org)

If /proc/cpuinfo (or other /proc files) look empty or incomplete, check that /proc is mounted and whether the procfs was mounted with restrictive options (e.g. hidepid) or you’re inside a container/VM where the guest kernel hides host details. Use mount | grep proc and review procfs mount options. (man7.org)

These commands avoid reprinting the options already mentioned in the thread and give complementary ways to verify installed vs. usable hardware and to diagnose common causes when tools disagree.

Recommended Answers

All 3 Replies

i would say use the dp command for the disk space
and the top command for the cpu

i think that file which you speak of is just a text document that
has the computer info saved on it some systems do have it some dont

Hi, I use the following....

For CPU & RAM ==> top
can also use ps aux to list all processes.

For disk info ==> df -h


As a bonus, fdisk -l (as root) will tell you about the disks (HD's, USB drives, etc) that are attached. Even those not mounted yet.

Hope this helps.

yes, thank you all. and i just found a command "# lshw" .. it has very detailed info about all your hardwares.. thanks thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.