get information about running processes using Systemd.

The sudo systemctl status command will show a tree view of all running processes on your Linux machine. This is quite comprehensive and very useful output. Here is a sample. 4.4 Mon Mar 04 jason@Yog-Sothoth 1: $ sudo systemctl status ● Yog-Sothoth State: running Jobs: 0 queued Failed: 0 units Since: Mon 2019-03-04 18:52:58 AEDT; … Read more

How to print the current environment variables in the Linux shell.

To print a listing of all environment variables in the Linux terminal or VT, use the printenv command, this prints the environment to the terminal. deusexmachina:~ jason$ printenv TERM_PROGRAM=Apple_Terminal SHELL=/bin/bash TERM=xterm-256color TMPDIR=/var/folders/8n/777bpxj118j6690m3s7lypqw0000gn/T/ Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.zKtQPi5TVv/Render TERM_PROGRAM_VERSION=421.1 TERM_SESSION_ID=6D73ABAB-FA6D-4AEF-9885-768BC4D18F9B USER=jason SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.19fMX85EE3/Listeners PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Applications/Wireshark.app/Contents/MacOS PWD=/Users/jason LANG=en_AU.UTF-8 XPC_FLAGS=0x0 XPC_SERVICE_NAME=0 SHLVL=1 HOME=/Users/jason LOGNAME=jason _=/usr/bin/printenvdeusexmachina:~ jason$ printenv TERM_PROGRAM=Apple_Terminal SHELL=/bin/bash TERM=xterm-256color TMPDIR=/var/folders/8n/777bpxj118j6690m3s7lypqw0000gn/T/ Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.zKtQPi5TVv/Render TERM_PROGRAM_VERSION=421.1 … Read more

Get information about your Macintosh machine using the command line.

Get the current status of your battery with this command. deusexmachina:~ jason$ sudo systemstats | grep "Battery Power" Battery Power: -8095 mW (-15.5 %/hr) Battery Power: -8034 mW (-15.6 %/hr) Battery Power: -6774 mW (-13.3 %/hr) Battery Power: -8080 mW (-15.3 %/hr) Battery Power: -7866 mW (-15.3 %/hr)deusexmachina:~ jason$ sudo systemstats | grep "Battery Power" … Read more

Get nice system information on Macintosh OS with the command line.

Get information about apps installed on your Macintosh PC with the lsappinfo command. Use grep as shown below to find out information about a certain app, i.e Firefox in this case. deusexmachina:~ jason$ lsappinfo | grep Firefox 24) "Firefox" ASN:0x0-0x2a02a: bundle path="/Applications/Firefox.app" executable path="/Applications/Firefox.app/Contents/MacOS/firefox" 26) "FirefoxCP WebExtensions" ASN:0x0-0x2c02c: bundle path="/Applications/Firefox.app/Contents/MacOS/plugin-container.app" executable path="/Applications/Firefox.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container" parentASN="Firefox" ASN:0x0-0x2a02a: (inferred) … Read more

How to print information about Linux users with the shell.

To get information about Linux users with the shell, give these examples a go. Get a listing of all /home folders on Linux. jason@Yog-Sothoth:~/Documents$ sudo gawk -F: ‘{ print $6 }’ /etc/passwd | grep /home /home/syslog /home/jason /home/justin /home/danieljason@Yog-Sothoth:~/Documents$ sudo gawk -F: ‘{ print $6 }’ /etc/passwd | grep /home /home/syslog /home/jason /home/justin /home/daniel Count … Read more

Get recently downloaded website files easily from the Linux command line with gnome.

How to stop and remove the gvfs-metadata service on your Ubuntu system The gvfs system that comes with the Gnome and MATE desktops also saves metadata about the users web download history. This is interesting, I thought only Firefox saved your download history, but gvfs saves this too. Use this command to see the saved … Read more

How to get good system information quickly on Linux.

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

Simple Linux commands to get information from your system.

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

Useful Linux commands for getting uptime and other information.

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 / … Read more

Use the ethtool command to get information about your Ethernet adapter.

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 … Read more

How to see whether a command is a executable or a shell builtin.

The type command for bash will tell you whether a command is a shell built-in or an executable on it`s own. This is very simple to use. This example shows how it works. jason@DESKTOP-G1QN8C6:~$ type -a echo echo is a shell builtin echo is /bin/echojason@DESKTOP-G1QN8C6:~$ type -a echo echo is a shell builtin echo is … Read more

How to get comprehensive information on HDD errors on Debian.

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. root@neo:/home/jason# apt install smartmontoolsroot@neo:/home/jason# apt install smartmontools Now you may check your hard disk drive for any errors. root@neo:/home/jason# smartctl … Read more

How to count the number of packages installed on your Ubuntu/Debian machine.

This useful command will display a count of all installed packages on your Debian Linux machine. jason@ubuntu:~$ dpkg-query -l | wc -l 2027jason@ubuntu:~$ dpkg-query -l | wc -l 2027 Grepping the output to find certain packages. jason@ubuntu:~$ 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 … Read more

Misc commands to get system information from a Linux box.

List all network interfaces on your Linux machine that are up. [jason@localhost ~]$ 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[jason@localhost ~]$ ip addr | grep UP 1: lo: … Read more

Very useful and informative Linux commands.

While running Linux, if you want to list the contents of a folder in a vertical list format, just use the ls command with these switches. jason@ubuntu:~$ ls -luh –color=yes total 48K drwxr-xr-x 2 jason jason 4.0K Dec 15 03:03 Desktop drwxr-xr-x 2 jason jason 4.0K Nov 29 17:00 Documents drwxr-xr-x 2 jason jason 4.0K … Read more

More commands to get information about your network adapter.

There are a few commands available in Red Hat Linux to get information about your network adapter. Here are a couple. The ifstat command returns information about the network throughput of your adapter. [jason@darknet ~]$ ifstat #kernel Interface RX Pkts/Rate TX Pkts/Rate RX Data/Rate TX Data/Rate RX Errs/Drop TX Errs/Drop RX Over/Rate TX Coll/Rate lo … Read more

Get hardware information with the Linux command line on Debian.

The hwinfo command for Linux will allow the user to get hardware information from the command line. Type sudo apt-get install hwinfo to install this command. It will be installed in the /sbin directory and therefore, you will need superuser privileges to execute this command and get the hardware information. jason@darkstar:~$ sudo apt-get install hwinfojason@darkstar:~$ … Read more