How Do You SSH into a Raspberry Pi 3 from a Windows Computer That Is on the Same Network?

Problem scenario
You want to use Putty from a Windows 7 or Windows 10 workstation to connect to a Raspberry Pi 3 on the network. You want to connect via a command prompt (not with a GUI).  What do you do?

Solution
On the Raspberry Pi do these three steps:
1.  Change password for the pi user or create a new user.

How Do You Troubleshoot the Error “No package foobar available”?

Problem scenario
You are running “sudo yum install foobar” but it is not working.   You are trying to install a package on a RHEL server, but it is not available from the configured repositories.  You notice that many packages you normally install are not available.  What should you do?

Solution
Run this command:
sudo yum-config-manager –enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional

FFR
To find the number of packages available to you in the configured repository (or repositories),

How Do You Set up HAProxy on a Linux Server?

Problem scenario
You have some web servers that you want a new HAProxy server to distribute traffic to.  You have an Ubuntu or Debian Linux server that you want HAProxy installed on.  You want HAProxy to be a load balancer. What do you do?

Solution
Prerequisites

You have at least two web servers set up and you know their IP addresses (either internal or external).  If you do not have these,

How Do You Fix a Python Program That Returns an Error “…subprocess.py … in check_output”?

Problem scenario
You are trying to use subprocess and check_output in Python to run raw Bash/shell/Linux commands.  

Your Python program has a line like this:
subprocess.check_output(“/usr/local/bin/coolprog arg1 /path/to/file.txt arg3”)

You get this error when you run the program:

 File “/usr/lib/python2.7/subprocess.py”, line 566, in check_output

What do you do?

Solution
This solution only applies if the Bash command is constructed from known good input. 

How Do You Get Raspberry Pi to Use a USB Drive?

Problem scenario
You are trying to use a USB stick with your Raspberry Pi.  But you get errors you receive say things like “operation not permitted” and “target is busy.”  You want to create new directories and files on this thumb drive.  What do you do?

Solution
1. Remove the USB stick.
2.  Insert it.  Do not choose the GUI prompt to use File Manager.

How Do You Troublshoot the Error “snappymodule.cc:31:22: fatal error: snappy-c.h: No such file or directory” when Trying to Install Apache Parquet?

Problem scenario
When trying to install Apache Parquet on Ubuntu, you get this error:

“Running python-snappy-0.5.1/setup.py -q bdist_egg –dist-dir /tmp/easy_install-SIHL_T/python-snappy-0.5.1/egg-dist-tmp-O8UnkU
WARNING: ‘.’ not a valid package name; please use only .-separated package names in setup.py
package init file ‘__init__.py’ not found (or not a regular file)
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
snappymodule.cc:31:22: fatal error: snappy-c.h: No such file or directory
compilation terminated.

How Do You Get to the First Character in a Linux Command Prompt?

Problem scenario
You are trying to run very long, complex Linux commands.  There are many case-sensitive flag options and convoluted DNS names.  It takes time to hold the left arrow to go to the beginning of the command.  Sometimes you want to comment out a line with a “#” at the beginning of the line as you draft these Linux commands.

Solution
Use ctrl-a to get to the first character of the command.

How Do You Update the BIOS of an HP Computer When the Option You Need Is Grayed Out?

Problem scenario
You turn on an HP computer (e.g., a desktop or laptop) and press Esc to go to the Startup Menu.  You then press F10 or use the down key and press enter to get to the BIOS menu.  When you are there you see the option you need “Update BIOS Using Local Media” is grayed out.  You entered administrator-level credentials successfully.  You have not other credentials to log into this HP startup menu. 

How Do You Manage (List, Resume or Terminate) Suspended Linux Commands?

Problem scenario
You have started some commands then used Ctrl-z while they were still processing.  You want to see which jobs have been suspended.  You may want to terminate or run the jobs. What do you do?

Solution
Use the builtin Linux command “jobs” like this:

jobs -l

# Sample output may look like this:

[1]- 26830 Stopped                

How Do You Enable IP Version 4 Forwarding on an Ubuntu Server?

Problem scenario
You want to enable IP version 4 forwarding on an Ubuntu server permanently.  How do you do this without rebooting?

Solution
1.  Run this command:sudo sysctl -w net.ipv4.ip_forward=1

2.  Modify the /etc/sysctl.conf file. Use “sudo vi /etc/sysctl.conf

Uncomment out this stanza:

net.ipv4.ip_forward=1

3.  Save the changes.