How to install Node.JS v6 on Linux

This video is a step-by-step instruction of installing Node.JS version 6 on Ubuntu or Linux Mint. Hint: As tempting as it might be, don’t install it through the package manager. I’ll explain why in the video below.

Node.JS Official Website:

Install and configure PyEnv on Linux

PyEnv is a great tool for installing and switching between different versions of Python, which is particularly helpful if you’re working on multiple projects or for multiple companies that use different versions of Python. In this video, I’ll show you how to install and configure PyEnv on Linux, but these steps should also work on Mac.

PyEnv Homepage:

PyEnv Installer:

Subscribe to my Youtube channel to get my latest full-stack tutorials every week.

switching from windows to linux

Switching from Windows to Linux

Four weeks ago I started working on a new project for a client.

The first task was to load up a Vagrant box to run their platform locally on my machine.

So I cloned the Git repo and ran ‘vagrant up’.

Immediately I was presented with errors… Tons of nasty, confusing errors.

It turns out that the Vagrant box was using the Ansible provisioner, which isn’t well supported on Windows.

I look for a solution, none of them are ideal.

I can either run the Ansible provisioner in a separate VM (in which case I practically need to re-write the Vagrant setup) or I can spend hours hacking away inside the ugly Windows Command Prompt window to do some black magic hackery and get Ansible working with Cygwin…

And I thought Vagrant was meant to make coding easier!

I ask around to see if anyone else has had the same issue. It turns out not a single member of the team is using Windows.

They all use either Linux or Mac OS (mostly Linux).

That’s when I decided it was time for me to make the switch away from Windows and give Linux a try.

Read more

How to change the hostname of a Linux server

This post describes how to change a hostname on a Debian 7 Linux server, however it will work on most other Linux distributions too.

Switch to root

sudo -i

Change the /etc/hostname file

echo '' > /etc/hostname

Restart the hostname service

/etc/init.d/ start

That’s it. The host name is now updated.

How to add an SSH public key to your Linux user account

Click here for the quick copy-paste option

Hi there, this is something that helps me out frequently so I wanted to share it with the community.

If you are at all security conscious, you will want to use public/private key authentication, instead of regular passwords, when authenticating to your servers.

This short guide will explain, quite simply, how to add your SSH private key to your server, so you can authenticate with your public key. This guide assumes you already have your public key to hand. I am using Debian 7, however it will work with many other popular distributions of Linux such as CentOS and Ubuntu.

1. Login to your server, and change to your home directory.

cd ~

2. Create a new folder called .ssh.

mkdir .ssh

3. Set the permissions on .ssh to 700.

chmod 700 .ssh

4. Change into that directory.

cd .ssh

5. Create a new file called authorized_keys.

touch authorized_keys

6. Set the permissions to 600 (many applications including OpenSSH will reject your key by default, if it’s accessible by other users).

chmod 600 authorized_keys

7. Open the file with a text editor (I use vi), and paste your keys in.

vi authorized_keys

That’s it. Now disable password authentication in SSH to improve the security of your box.

Thanks for reading.

Here are all the commands together in-case you are want a quick copy and paste job:

cd ~
mkdir .ssh
chmod 700 .ssh
cd .ssh
touch authorized_keys
chmod 600 authorized_keys
vi authorized_keys