element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs How to set up a Raspberry Pi without an external monitor or keyboard
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: anpivey
  • Date Created: 3 Aug 2018 1:35 PM Date Created
  • Views 602 views
  • Likes 3 likes
  • Comments 0 comments
  • monitor
  • raspberry pi
  • headless
  • iot
  • set-up
  • beginner
Related
Recommended

How to set up a Raspberry Pi without an external monitor or keyboard

anpivey
anpivey
3 Aug 2018

Many tutorials out there state that you need an external monitor, keyboard, and mouse to get started with Raspberry Pi. However, if you don't have these things at hand, there is a solution - headless mode.

Components

You will need the following components:

  • Raspberry Pi
  • microSD card
  • SD card adapter
  • Micro USB to USB cable
  • Ethernet cable (if connecting via ethernet)
  • Computer with an SD slot (or an appropriate SD card adapter)

Installing the operating system

  • Download Raspbian and extract the .img file.
    • On Windows, right-click on the Zip file in your downloads folder and click Extract All.
  • Insert the microSD into your computer's SD card slot via the SD card adapter.
  • Next, you'll need to flash the Raspbian image to the microSD. There are various applications you can use to do this, such as Etcher for Linux, macOS or Windows.
  • Open the SD card from your file explorer - the drive will be labelled boot.
  • SSH access is disabled by default. To enable it, create an empty file in the boot drive called ssh.
    • On Windows, inside the boot directory, right-click in the white space, scroll to New and select Text Document. Enter ssh as the name.

Connecting to the network

OPTION 1 - VIA ETHERNET

  • Connect the Raspberry Pi to your router via ethernet cable, and proceed to the next section.

 

OPTION 2 - VIA WIFI

On Mac/Linux

  • Create a new file in the boot drive called wpa_supplicant.conf.
  • Follow code step below.

On Windows

  • Download and install Notepad++ from here.
  • Once installed, inside Notepad++ go to File > New to create a new file.
  • In the top bar, select Edit > EOL Conversion. Make sure Unix (LF) is selected. It should appear disabled if it is.
  • Select File > Save as, navigate to your boot drive and call the file wpa_supplicant.conf.

All OSs

  • Paste in the following code:

 

country=IE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1network={
scan_ssid=1
ssid="Your-SSID"
psk="Your-PSK"
key_mgmt=WPA-PSK
}

 

 

Replace Your-SSID with your WiFi network, and Your-PSK with your WiFi password.
This file will tell the Raspberry Pi to connect to the specified network when it boots up.
image


Important
Make sure your computer is connected to the same network as your Raspberry Pi.


Booting up the board

  • Eject the microSD card and insert it into the Raspberry Pi's microSD slot.
  • Connect the PWR IN micro USB on your Raspberry Pi to a 5v power source (e.g. your computer's USB port).
  • Wait for the board to boot up - the green LED should stop flashing when it's finished booting up.

Get your Raspberry Pi's IP Address

Option 1 - Login to your router

  • If you have access to your router, you can login to it's admin panel via a browser. It's usually something like 192.168.0.1, 192.168.1.1 or 192.168.1.254.
  • Look at the list of devices and find the IP address of your Pi. It should look something like 192.168.1.8.

Please note
When entering a password in terminal or command prompt, you won't see it being typed, for security reasons. Simply type the password and hit the enter key.


 

Option 2 - Scan using Nmap

The nmap command (Network Mapper) is a free and open-source tool for network discovery, available for Linux, macOS, and Windows.
To install on Linux, install the nmap package. To do this, load your terminal and run the command apt-get install nmap. (If it does not run due to permissions, try sudo apt-get install nmap).
To install on macOS or Windows, see the nmap.org download page here.

To use nmap to scan the devices on your network, you need to know the subnet you are connected to. First find your own IP address, in other words the one of the computer you're using to find your Pi's IP address:
On Linux, type hostname -I into a terminal window
On macOS, go to System Preferences then Network and select your active network connection to view the IP address
On Windows, go to the Settings, then under Network and Internet, select your connection type i.e. Wi-Fi, Ethernet, click Properties (for some this is called Hardware Properties.
In here, you will see IPv4 address.
Now you have the IP address of your computer, you will scan the whole subnet for other devices. For example, if your IP address is 192.168.1.5, other devices will be at addresses like 192.168.1.2, 192.168.1.3, 192.168.1.4, etc.

In your terminal or Command Prompt, now use the nmap command with the -sn flag (ping scan) on the whole subnet range. This may take a few seconds:
nmap -sn 192.168.1.0/24

Note: The 192.168.1 part in the command above should be replaced by the first 3 parts of the IP address you attained previously.

Ping scan just pings all the IP addresses to see if they respond. For each device that responds to the ping, the output shows the hostname and IP address like so:

Starting Nmap 6.40 ( http://nmap.org ) at 2018-04-02 12:51 GMT

Nmap scan report for Conalls-MBP (192.168.1.4)

Host is up (0.0017s latency).

Nmap scan report for iPhone (192.168.1.45)

Host is up (0.0021s latency).

Nmap scan report for raspberrypi (192.168.1.8)

Host is up (0.0038s latency).

Nmap done: 256 IP addresses (3 hosts up) scanned in 2.21 seconds

Here you can see a device with hostname raspberrypi has IP address 192.168.1.8.

 

Option 3 - Use the hostname

By default, the hostname for the Raspberry Pi is raspberrypi. If you cannot get your IP address, you can try using raspberrypi.local instead.

Connecting to Raspberry Pi via SSH

On Mac and Linux

  • Open a terminal window, and run ssh pi@ip-address.
    • Replace ip-address with the one you attained in the previous step.
  • You will be prompted to enter a password - the default password is raspberry.

image

On Windows

  • Download Putty from here to allow you to communicate with your board via SSH.
  • Under Host Name (or IP address) enter the IP address for your Raspberry Pi.
  • Click the Open button to create the connection.

image

That's it! You're now connected to your Raspberry Pi via SSH. You can configure the board by running sudo raspi-config.

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube