Some easy Terminal commands that let you quickly get information about your settings

Reading some of the posts here it seems to me that some people are not sure exactly what is what on there system. I was once in a similar place when I started using Linux and found there was an easy way for getting that information. Here are some of Terminal commands that help you to do that quickly. Unless you’ve encrypted you set up you will not have to use your password. Also note that there is a space between some of the commands without which they will not work,

System information

uname -a #Linux system information - you should already know what distro you are using
uname -r # The kernel version that you are using

Hardware

dmidecode This will give all the hardware information from the Bios
lspci -tv all PCI devices
lsusb -tv all USB devices

Networking

ifconfig -a This will show all the network interfaces and their ip address

These are a few simple things that might help you. This is not a comprehensive list, just meant for a beginner to start off with. I am not sure if you can still do so, but you used to be able to download a free terminal command sheet from Linux Training Academy. com

4 Likes

lshw was the first command i learned to get hardware info. bash usually prompts me to use sudo lshw for more complete results. sudo lshw -C network (-C alias for -class) will show info for just network interfaces.

2 Likes

You can use the lshw or the lshw -short command too, which is very informative about the system.

Check this: https://www.tecmint.com/commands-to-collect-system-and-hardware-information-in-linux/

3 Likes

I’d like to chime in with a tool called inxi.

What I also like:

timedatectl            # shows time, date, timezone
hostnamectl            # shows system info, etc.
dmesg -w               # continually shows dmesg output

For networking, I recommend the next-gen WiFi manager wicd.

6 Likes

Nice replies from everyone, thank you. My idea was to start this off simply for those who might not realise how useful the Terminal can be and how much easier it is in Linux than it is in Windows.

So please others join in with the easy things you have found that have helped you so may well help others in our community :+1::+1:

2 Likes

System Specs

  • lsusb
  • inxi -Fxz
  • sudo lshw -short
  • lshw -class memory
  • cat /etc/*release

Network

  • inxi -ni
  • sudo lshw -class network

Boot times (systemd only)

  • systemd-analyze time
  • systemd-analyze blame

UEFI

  • efibootmgr -v
  • [ -d /sys/firmware/efi ] && echo “Installed in UEFI mode” || echo “Installed in Legacy mode”
3 Likes

This is pretty neat, thanks for the tip.

1 Like

There is also

  • systemd-analyze critical-chain

Which expends the search, a bit anal, but thorough.

Example your Network Manger is retarding your overall boot between 5 and 10 seconds, a common issue I’ve found with Debian in recent years (and found with the blame command). Run this command as root.

  • su
  • systemctl disable NetworkManager-wait-online.service

:sunglasses:

1 Like

nice compact table view. thanks for the recommendation :slight_smile:

1 Like

i use lsblk to make sure i know which device i am writing dd to (among other things) and blkid came in handy when i was changing my swap file to a swap partition.

1 Like

the article below was what reminded me about lsblk and blkid. i was never a big fan of the messy feel of the blkid output which stretches out and line wraps. in that article, the author shows that lsblk -o name,mountpoint,size,uuid gives most of the same info (minus the volume labels on my internal hdd) but in a more orderly (human readable?) feeling table.

https://www.2daygeek.com/check-partitions-uuid-filesystem-uuid-universally-unique-identifier-linux/#

1 Like

Thanks for the link. I am sure that others will find it interesting.

1 Like

When I am installing Arch, the first command I enter is “ip link” to check to see if network is up or down, and also for the network name.