Renaming the hostname of your Raspberry Pi (Raspbian)

One of the first things you want to do if you've just installed Raspbian on your Pi is to change the hostname. You can change your hostname by following these steps. ## Steps You can use the 'hostnamectl set-hostname [name]' command, but that does not update /etc/hosts and causes issues with Docker and other networking services. I prefer to update /etc/hostname and /etc/hosts manually. 1. Change /etc/hostname ``` sudo nano /etc/hostname ``` Change raspberrypi to your desired hostname Hit CTRL+O and then ENTER to Save Hit CTRL+X to Exit note: Only use the letters 'a' to 'z' (upper or lower), digits '0' to '9', and the dash '-' for your new hostname. ![](http://cms.fabianvansteen.nl/api/assets/raspberry-hostname-step1-1.png) 2. Change /etc/hosts ``` sudo nano /etc/hosts ``` Change raspberrypi to your desired hostname Hit CTRL+O and then ENTER to Save Hit CTRL+X to Exit ![](http://cms.fabianvansteen.nl/api/assets/raspberry-hostname-step2.png) 3. Reboot ``` sudo reboot ``` 4. Check your new hostname ``` hostname ``` ![](http://cms.fabianvansteen.nl/api/assets/raspberry-hostname-step4.png)

Read More

How to install Docker on your Raspberry Pi

# What is docker? Docker is an open-source project for automating the deployment of applications as portable, self-sufficient containers that can run on the cloud or on-premises. Docker is also a companythat promotes and evolves this technology. Docker works in collaboration with the cloud, Linux, and Windows vendors, including Microsoft. ## How to install Docker With one of the latest releases of Docker. They added official support for Raspbian. You now can easily install Docker on your Raspberry Pi with one simple command. Install Docker with the following command. ``` curl -sSL https://get.docker.com | sh ``` After running this command Docker has been installed on your Raspberry Pi. If the installation has finished correctly, Docker must be up and running. You can verify your installation by running "docker ps". ``` sudo docker ps ``` ![](http://cms.fabianvansteen.nl/api/assets/docker-step1.png) ## Add your user to the docker group (optional) If you don't like to run all your Docker command with the sudo. It is possible to add your pi user to the docker group. This will allow you to invoke all docker commands without sudo. Added your user with the following command. ``` sudo usermod -aG docker pi ``` ## Run your first docker image Now is time to run your first Docker image on your Raspberry Pi. To run a container we could run the command "run docker hello-world image". ``` docker run hello-world ``` ![](http://cms.fabianvansteen.nl/api/assets/docker-step2.png) If you have run the command, you'll see a Hello World message from the freshly started container. Now you have started your first Docker container :)

Read More