Get Linux system information To get good Linux system information, use these simple utilities. 1. Screenfetch. Install screenfetch. [email protected]:~$ sudo apt install [email protected]:~$ sudo apt install screenfetch Then run it to get information about your PC. [email protected]:~$ screenfetch ./+o+- [email protected] yyyyy- -yyyyyy+ OS: Ubuntu 17.04 zesty ://+//////-yyyyyyo Kernel: x86_64 Linux 4.10.0-35-generic .++ .:/++++++/-.+sss/` Uptime: 1h …

Get your Internet routable IP address with the command line. [[email protected] ~]$ curl ‘https://api.ipify.org’ ; echo[[email protected] ~]$ curl ‘https://api.ipify.org’ ; echo Get the startup time of your Linux PC with Systemd. [[email protected] ~]$ systemd-analyze Startup finished in 1.186s (kernel) + 9.653s (initrd) + 2min 37.144s (userspace) = 2min 47.984s[[email protected] ~]$ systemd-analyze Startup finished in 1.186s …

Very useful Linux commands Another way to get the uptime of the system. awk ‘{printf("Uptime: %d:%02d days, %02d minutes, %02d seconds.\n",($1/60/60/24),($1/60/60%24),($1/60%60),($1%60))}’ /proc/uptimeawk ‘{printf("Uptime: %d:%02d days, %02d minutes, %02d seconds.\n",($1/60/60/24),($1/60/60%24),($1/60%60),($1%60))}’ /proc/uptime Find the actual device name of the drive that contains your root partition. ip-172-31-20-16:~> findmnt -n -o SOURCE / /dev/xvda1ip-172-31-20-16:~> findmnt -n -o SOURCE / …

The ethtool utility for Linux is very good at getting information about your Ethernet adapter. Below is the standard information that is available concerning the basic abilities of the Ethernet adapter. localhost% ethtool enp0s25 Settings for enp0s25: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: No …

The smartmontools package for Debian allows the user to get comprehensive hard disk information. This is useful if the hard disk drive is behaving strangely. This might mean it is failing. Install the smartmontools package. [email protected]:/home/jason# apt install [email protected]:/home/jason# apt install smartmontools Now you may check your hard disk drive for any errors. [email protected]:/home/jason# smartctl …

This useful command will display a count of all installed packages on your Debian Linux machine. [email protected]:~$ dpkg-query -l | wc -l [email protected]:~$ dpkg-query -l | wc -l 2027 Grepping the output to find certain packages. [email protected]:~$ dpkg-query -l | grep vim ii vim-common 2:7.4.052-1ubuntu3 amd64 Vi IMproved – Common files ii vim-tiny 2:7.4.052-1ubuntu3 amd64 …

List all network interfaces on your Linux machine that are up. [[email protected] ~]$ ip addr | grep UP 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000 3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN[[email protected] ~]$ ip addr | grep UP 1: lo: …

This command lists the information about your user. C:\Users\homer&gt;net user Administrator User name Administrator Full Name Comment Built-in account for administering the computer/domain User’s comment Country code 000 (System Default) Account active No Account expires Never   Password last set 11/2/2006 11:08:15 PM Password expires Never Password changeable 11/2/2006 11:08:15 PM Password required Yes User …

The mount command shows information about your mounted partitions on your machine. iMac305:~ admin$ mount /dev/disk0s2 on / (hfs, local, journaled) devfs on /dev (devfs, local, nobrowse) map -hosts on /net (autofs, nosuid, automounted, nobrowse) map auto_home on /home (autofs, automounted, nobrowse) map -fstab on /Network/Servers (autofs, automounted, nobrowse) /dev/disk0s3 on /Volumes/Scratch (hfs, local, journaled)iMac305:~ …

Linux hardware information commands. There are many commands available for Linux that allow the user to get information about their hardware. Here is a handful of them. The lshw command. deusexmachina description: Notebook product: eME730 (Calpella_CRB) vendor: eMachines version: V1.15 serial: LXN98020810441E9781601 width: 64 bits capabilities: smbios-2.6 dmi-2.6 vsyscall32 configuration: boot=normal chassis=notebook family=Intel_Mobile sku=Calpella_CRB uuid=40198687-F9A4-2099-05F2-88AE1D6D09BC …

Some useful links and bits of information for budding Linux users. Bash cheat sheet. http://www.catonmat.net/download/bash-history-cheat-sheet.pdf. This is a very useful bash cheat sheet that will greatly assist you when you are learning the bash shell. (PDF). The .bash_history file may be blocked by using the unset HISTFILE variable in your .bashrc file. Read more about …