Command lines for Linux hardware information

Posted on 2025-10-22

In computer science papers, you’re usually requested to add an “experimental setup” that shows your computer specs. People tend to document different things. Some people will list only the GPU, others will cite the version for some of their software and others tend to go “all in”. For my own and other’s reference, here’s the commands I use on Linux to extract system information. You may not have all the commands available, in that case, I’d refer you to chatGPT or stackoverflow.

CPU info

grep "model name" /proc/cpuinfo | uniq
lscpu | grep "CPU(s)"

Main memory:

htop or free -mh

GPU

nvidia-smi -L nvidia-smi

disk

df -h will reveal what disk uids are mounted for which partition. To find out if the disk is HDD or SSD, replace diskname in the following: /sys/block/diskname/queue/rotational (1 means it is an HDD)

To estimate disk read speed, replace yourtestfile in the following:
fio --name=readmax --filename=yourtestfile --rw=read --bs=512KB --ioengine=io_uring --iodepth=32 --numjobs=1 --direct=1 --time_based --runtime=30 --group_reportingI Be aware that the disk read speed will fluctuate with a few hundred MB depending on the “bs” and “iodepth”

python stuff

To find versions: python -c "import torch; torch.__version__"

Got suggestions, corrections, or thoughts? Post a comment!

Markdown is allowed
Email is used just to show an avatar image and is not displayed or stored
Comments are moderated. They will appear below after they are approved.

0 comments