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 embed the output of a command into a bash script.

Embedding the output of a command into a bash shell script is quite easy. Here is an example. echo "Hello $(whoami), the date is $(date -u). Have a nice day"echo "Hello $(whoami), the date is $(date -u). Have a nice day" This is the output this will give you. ┌─[jason@neo]─[~] └──╼ $echo "Hello $(whoami), the … Read more

Get information about your network connection with netstat on Windows.

Get network information on Windows with netstat Netstat on Windows can provide a lot of information about your network connection. This example shows netstat showing Ethernet statistics. c:\Windows\System>netstat -e Interface Statistics   Received Sent   Bytes 2307072092 27407417 Unicast packets 1757202 320154 Non-unicast packets 0 0 Discards 0 0 Errors 0 0 Unknown protocols 0c:\Windows\System>netstat … Read more

Sample Java code that shows how to use arrays and list the contents of an array in order.

This Java code displays a list of students and their scores and also displays a list of their names in alphabetical order. Use this command to compile this: gcj –main=Employees Employees.java -o hello. /* * My first Java program. * */   import java.util.Arrays;   public class Employees {   public static void main(String[] args) … Read more

How to use color in the ls command to brighten up your directory listings.

Below we see output of the ls command when listing a directory. The –color=auto parameter allows the use of color if your terminal supports it. And since everyone either uses Konsole or Gnome Terminal; this command will always work. I am using zsh at the moment; but this works with just about any shell. ls … Read more