Saturday, November 28, 2020

Creating a file with no extension in Windows

 For an index to all my stories click this text

This is just a short tip for those of you who are installing the Raspberry operating system on a PC.

I am using several Raspberry Pi's in my home for different purposes. Here is my list of Raspberries that are used in my home at this moment:
- Pi 3 as a Media player
- Pi 2 as a Printer server
- Pi 3B with Octoprint for controlling my 3D printer
- Domoticz for my home automation
- Pi Zero as Internet Radio

So all in all a bunch and I am adding more. My next one is going to be a NAS as I still have some old drives lying around.

To install a new Rapsberry I download the latest Raspbian from the Raspberry website and put it on an SD card with Etcher. Nothing special until now.

SSH

The Raspberry has the capability to work headless. This means that you do not need a monitor, keyboard and mouse. You can run the Raspberry over SSH with a terminal program on your PC. I use Putty for that.



Above you can see how such a session works.

In raspi-config you can activate SSH but how are you going to start raspi-config if your Raspberry-Pi starts headless. Well you can activate SSH by putting an empty file with the name ssh in the boot folder of the SSD card.

So after writing the SD card with Etcher on my PC I open the SD card and write a file with the name SSH on it.

But there is a small problem. You need to make that empty file yourself. The file may not have an extension. And that is a bit of a problem in Windows. I struggled some time with how to do that, so here is the trick.

Open the SD directory and right-click the mouse.



Now you can make a new file. But wait, each of the options will make a file with an extension. If you make a new text file for instance the name will be ssh.txt and that is not what we want. We want NO extension.

If you make the file ssh.txt you can ask the info for it but can not remove the extension. And when there is an extension it will not activate SSH in the Raspberry.

How to make an empty file without an extension.

This is the way to do it.



Open notepad on your PC
Now you have an empty document.

Chose Save As.



Put the name of the file in as follows:

"ssh"

So put quotes around the filename. As type choose ALL and not text. And then save it into the SD's 



Now the empty file will be saved and without an extension, just like we needed.

It took me a while to find this trick. So I hope it is usefull for you to.

Till next time

Luc Volders