Linux: Transferring Your Windows 10 Entitlement License to a Virtual Machine

The very first thing that I did when I got my new Thinkpad in a few months ago was of course, format the hard drive and put Ubuntu on it without hesitation.

The very first thing that I did when I got my new Thinkpad in a few months ago was of course, format the hard drive and put Ubuntu on it without hesitation.

However, I am now working on a project that requires me to run Windows for Visual Studio. Since I refuse to run Windows as my host, I went ahead and spun up a Windows 10 virtual machine in VirtualBox but I still had to activate it. Like most machines bought within the last few years, they come with a Windows 10 license as an “entitlement”.

So to transfer my entitlement license from the Thinkpad was fairly easy. In your Linux terminal, simply type: sudo cat /sys/firmware/acpi/tables/MSDM and it will display your Windows 10 license key in plain text that you can then plug into your virtual machine so it can activate.

Upgrading your Raspberry Pi from Jessie to Stretch

The Debian team released their latest version of their operating system, Debian 9.0 Stretch back in June of this year, so it took a few months their Raspberry Pi variant, Raspbian to be adapted for Stretch but as of last month it is finally out!
Now usually with a major version upgrade I usually like to just do a clean install of the OS but I was feeling kind of lazy so I just decided to upgrade.

Note: Always be sure that your Raspberry Pi is backed up before you do a major upgrade such as this.

To upgrade, make sure that your current version of Raspbian Jessie is up to date by either in the terminal or SSH typing:

  • sudo apt-get update
  • sudo apt-get upgrade

Once Jessie is up to date, you’ll need to add the new repository for Stretch. To add the repository, type: sudo sed -i 's/jessie/stretch/g' /etc/apt/sources.list

Now, refresh your repository mirrors again by typing: sudo apt-get update

It’s now time to perform the upgrade. Go ahead and type: sudo apt-get upgrade again. It will prompt you several times during the upgrades about package conflicts and what not, for most cases the default option should be fine.

It should take about 15-20 minutes for the upgrade to complete depending on your internet connection. Once it’s done, go ahead and reboot your Pi by typing: sudo shutdown -r now

That’s it! You have now successfully upgraded your Pi to Raspbian Stretch!

CentOS: My Preferred Server Operating System

Every time I need to setup a new server, unless the application(s) I’m planning to host on it requires different, my go to operating system has been CentOS for the past decade or so, mostly because of how rock solid it is (I don’t think I’ve ever had a CentOS server crash on me). That’s partly because it is a derivative from Red Hat Linux. In fact, Red Hat not only owns the trademarks for CentOS, it also employees their primary developers.
I hardly ever setup a Linux server with a GUI so most of the time I install it with the minimalist image which works great for my LAMP servers, SAMBA servers and script servers. Because of its association with Red Hat, most mainstream Linux applications have support and documentation for CentOS. Another extremely important thing to look for in server operating systems is the lifecycle, meaning how long will the CentOS team maintain the release of a version and provide security updates and such. Most CentOS versions have a lifecycle for a decade so you won’t have to worry about being forced to upgrade anytime soon after you implement a CentOS server.

I wouldn’t recommend using CentOS as a workstation at all given that its GUI is extremely slimmed down but for a server operating system you are hard pressed to find a OS as solid as CentOS.

Quick Tip: Use screen to keep your application running in the background in terminal

Every once in a while you need to keep an application running in an SSH session after you logout.
To be able to logout and log back in later, you’ll need to install an application called “screen”.

To install screen on Ubuntu/Debian type apt-get install screen in the terminal.

To use screen:

  • Start the application by using the command: screen application
  • Get the application running how you want it to run and then type CTRL + A + D to return to the terminal
  • Now you can do whatever else you need to in terminal or logout of SSH while your application runs in the background
  • To get back to your application, simply log back in via SSH or open terminal again and type screen -r and your session will come back up