Unix System info commands:

CommandDescriptionSyntaxExample
uname -aDisplay system informationuname -aDarwin MacBook-Pro.local 20.2.0 Darwin Kernel Version 20.2.0: Fri Nov 13 20:45:48 PST 2020; root:xnu-7
df -hDisplay free disk spacedf -hFilesystem Size Used Avail Use% Mounted on <br> /dev/sda1 30G 5.4G 24G 19% /
du -sh <directory>Display the size of a directorydu -sh /etc/4.0K /etc/
free -mDisplay free and used memoryfree -mtotal used free shared buff/cache available <br> Mem: 7805 633 4716 13 855 6905
topDisplay the system processestoptop – 13:14:21 up 4:37, 2 users, load average: 0.08, 0.09, 0.10
ps -efDisplay the process hierarchyps -efUID PID PPID C STIME TTY TIME CMD <br> root 1 0 0 Feb06 ? 00:00:01 /sbin/init
uptimeDisplay the system uptimeuptime13:15:01 up 4:38, 2 users, load average: 0.08, 0.09, 0.10
ifconfigDisplay network interface configurationifconfigeth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 <br> inet 192.168.0.100 netmask 255.255.255.0 broadcast 192.168.0.255
ip addr showDisplay network interface configurationip addr show1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 <br> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 <br> inet 127.0.0.1/8 scope host lo <br> valid_lft forever preferred_lft forever

Note: The output of these commands may vary based on the Unix-based operating system you are using (e.g. Linux, macOS, etc.).

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top