Troubleshooting Snap on Ubuntu Core


I got started with Ubuntu Core on the Raspberry Pi and I had some problems (nothing major) starting with snap on Ubuntu Core. Here are some quick resolutions:

  • is the snap daemon on? Restart the service with service snapd restart
  • errors installing snaps? Did you login? Do snap login

Multicast DNS on Ubuntu Core


Are you setting up a host with multicast DNS (mDNS) on Ubuntu Core?

There are some posts out there 1 2 3 about people trying to get mDNS on their Ubuntu Core. But avahi-daemon is now available as a snap for Ubuntu core.

Multicast DNS and Hostnames with Underscores


Are you setting up a host with multicast DNS (mDNS) but you can’t seem to reach it?

Are there underscores in your hostname?

avahi will discard underscores if they are present in the hostname.

my_host_name == myhostname

ping myhostname

The Complete Raspberry Pi Start Up Guide


Follow these steps to quickly start up your Raspberry Pi.

1. Wire into the Raspberry

  1. Connect microUSB for power.
  2. Connect USB keyboard.
  3. Plug in the microSD (with OS already installed).
  4. Plug in HDMI to Display.
  5. (optional) Connect USB mouse.

Artist Rendition of Raspberry Pi

2. Change the default password for the pi user.

  • Enter command

    $ sudo raspi-config

  • Navigate to the Change User Password option.
  • Follow the on-screen instructions to change the password for the pi user.
  • This is probably one of the simplest things you can do. Many people leave the default password and when they expose the Raspberry Pi to the world, bad things happen.

3. Expand the filesystem to full capacity of the microSD.

  1. Enter command

    $ sudo raspi-config

  2. Navigate to Advanced Options.
  3. Select Expand Filesystem.
  4. Follow the on-screen commands. You’ll be asked to reboot.

4. (optional) Enable ssh

  1. Enter command

    $ sudo raspi-config

  2. Select Interfacing Options
  3. Navigate to and select SSH
  4. Choose “Yes” to enable ssh.
  5. Select “Ok”
  6. Choose “Finish”

5. (optional) Connect to Ethernet/Wifi

  1. Ethernet: easy, plug in an Ethernet cable to the Ethernet port.
  2. Wifi: add the network configuration to wpa_supplicant.conf
    1. Enter command

      $ sudo vi /etc/wpa_supplicant/wpa_supplicant.conf

    2. Add entry

       network = {
    3. Enter command

      $ sudo wpa_cli reconfigure

    4. More info

6. (not optional if you activated ssh!!!) Secure SSH:

  1. Edit file

    $ sudo vi /etc/ssh/sshd_config

  2. Do not allow root ssh (add/modify line to “PermitRootLogin no”)
  3. Limit user logins (add/modify line to “AllowUsers [username1] [username2] …”)
  4. Disable protocol 1 (Only have an entry for “Protocol 2”)
  5. (optional) change default port (add/modify line to “Port [some number]”)
  6. (optional) filter SSH at firewall a.k.a. only allow certain IP addresses to SSH
  7. Use public/private key for authentication
    1. Move public key over
  8. Now disable password authentication (“PasswordAuthentication no”)
  9. Restart the ssh service

    $ sudo service ssh restart

  10. More info

Artist Rendition of Raspberry Pi Logo

4 Stages of IT Harmony


Read on enlightened one

Typically at a larger company, the IT department may have strict processes and controls for their work. Usually, it involves submitting a ticket for something to be resolved.

I had to learn how to work within this system so that it became productive for me. However, I learned some things along the way that made it easier for both IT and myself.

I learned that there are 4 stages for IT Harmony. I’ll describe my evolution where I become more and more harmonic with IT.

Stage 1: Complete Idiot

The programmer is trapped in an endless world of trial-and-error. They are dependent on those around them and will turn to them at the first sign of distress.

“Help! I can’t ssh into the VM!”

IT Solution: “You had a typo in the hostname.” IT doesn’t even let you type. They take the keyboard, type in the correct hostname, then walk back to their desk to work on bigger ticket items.

Remedy: Stop being dumb. Double-check your inputs.

Stage 2: Ordinary

The programmer is now aware of their surroundings. The programmer yearns for truth yet is limited by their experience.

“Help! I checked everything and I can’t ssh into the VM!”

IT Solution: “VM is down for maintenance. You didn’t look at your email stating that However were scheduling the maintenance at this time?”

Remedy: Learn to use ping to double-check if the server is even reachable. You may even use curl or wget to check ports and responsiveness. And you read your emails.

Stage 3: Cloud-Enterer

The programmer has the basic foundations for being productive. They march ahead with their knowledge where they meet the boundaries of the corporate policies.

“Help! I can’t ssh into the VM! I ping’d it and it’s there!”

IT Solution: “Our firewall blocks that port. Please submit a ticket and a justification for approval to open the port. We’ll also need a list of hosts that can access it.”

Remedy: You learn the policies and the processes of the company. Most importantly, you learn how the tools of IT work.

You learn the basic firewall toolkits for your OS.

You learn DNS and BIND.

You learn TCP/IP Networking.

You learn Linux/UNIX/Windows + Network Administration.

Stage 4: Connected

The programmer is in harmony with IT. The programmer does not do IT’s job. The programmer simply is able to identify specifically their issues thereby reducing the searching, guessing, and troubleshooting required by IT. The programmer is regularly invited by IT to partake in evening festivaties.

“Help! I can’t ssh into the VM! I used nslookup and got nothing. I tried dig as well. It looks like the DNS entry never got made for the VM!”

IT Solution: “Ah, we were trying something new with Puppet. Thanks for letting us know, we’ll fix it real quick.”

Remedy: Programmer is at harmony.