Where Do You Find the IP Address from Most Recent Login on a Linux Server?

Problem scenario
You want to know where the Linux users are logging on from (e.g., for security and configuration reasons).  You want to know the IP addresses of their desktops.  Where do you find the IP address from most recent login on a Linux server?

Solution
To see the most recent login session details (including IP address), run this command:

last

After you press enter you’ll see the most recent logins.

How Do You Troubleshoot a False “State” Value in nmap Results?

Background
For troubleshooting networking issues with a Linux/Unix server, the nmap utility is extremely useful.  For Windows with PowerShell version 3, there is a script can help you almost as much as nmap; see this posting if you are interested.  For newer versions of PowerShell, use the Test-NetConnection command.  

Problem scenario
You use nmap to test a port on an IP address.  

How Do You Connect to a Specific Postgres Database without a SQL Front End?

Problem scenario
From a Linux command prompt (e.g., Linux terminal) you want to connect to a specific Postgres database.  How do you create a table or issue SQL commands to a specific Postgres database from the back-end (the Postgres server itself)?

Solution
1.  First enter the Postgres command prompt by running these two commands:

sudo -i -u postgres
psql

2.

How Do You Know If Your Linux Server Can Support a Docker Installation?

Problem scenario
You want to install Docker on Linux.  How do you determine if the VM or physical server with Linux meets the minimum requirements for installing Docker?

Solution
Run this script:

#!/bin/bash
# Written by continualintegration.com
echo “This will test if your Linux server is ready for Docker.”
i=0;

os=$(uname -m | grep -i x)
if [ -z “$os” ];

How Do You Know If Your Linux Kernel Meets the Minimum Requirements for Docker?

Problem scenario
You want to install Docker, but you want to be sure that the kernel is high enough to be supported.

Solution
The minimum kernel version is stated on Docker’s website.  As the spring time of 2017, run this script to find out if your kernel version is high enough:

a=$(uname -r)
b=$(echo $a | awk -F  “.” ‘/1/ {print $1}’)
c=$(echo $a | awk -F 

How Do You Get Passed an Error about an Environment Variable When Installing etcd on Linux?

Problem scneario
According to Coreos.com, etcd is  “[a] distributed, reliable key-value store” to be used on  “a distributed system.”  You are trying to install etcd, but you get an error about an environment variable and invalid syntax.  

For example, you try to run this script:
./etcd

But you get this output:  

“2017-03-31 19:22:19.332257 I | flags: recognized and used environment variable ETCD_VERSION=2.2.0
2017-03-31 19:22:19.332385 C | etcdmain: invalid value “2.2.0” for ETCD_VERSION: strconv.ParseBool: parsing “2.2.0”: invalid syntax”

What should you do to install 

How Do You Determine a MAC Address of an IoT Device (without Network Administrator Access to a Router)?

Problem scenario
You have a device (e.g., some IoT gadget such as an EZviz camera) that can connect to a network (e.g., via WiFi).  But you do not have access to the administration (e.g., back end) of the router itself. You want to learn the IoT device’s MAC address (e.g., for a third party that can grant the device WiFi access).  If you administered the router, you could find the MAC address of devices that could connect to the router.  

How Do You Configure an Ezviz Mini 0 Camera for the First Time?

Problem Scenario
You want to configure an Ezviz Mini 0 camera for the first time.  How do you set it up?

Solution
Warning:  The lowest cost plan for ezviz cloud storage is $59.99.  However you do not have to purchase the cloud storage to use the camera.

1.  Connect the camera to a power outlet.  
2.  Hold the reset button for 10 seconds.

How Do You Protect Your Privacy When You Are Traveling?

Updated on 8/1/21

Problem scenario
You want to travel and protect your privacy.  You use a cell phone, smart phone, and/or laptop like anyone else.  What can you do to enhance or preserve your privacy?

Solution
There are three parts to this solution.  The first part involves items you would bring with you.  The second part is for items that help secure your home when you are away. 

How Do You Check If a Variable in Ruby Is a Boolean?

Problem scenario
You want to determine if a variable is being assigned a non-string “true” or “false” data type.  That is, you want to distinguish from a string value of true/false and the Boolean, built-in, supported data type of true/false.  Some programming languages support Boolean or bit values.  Ruby has a number of data types.  There is a feature that Ruby supports to test for most of its datatypes.  By appending to a variable this “.is_a?”,