How to Connect a Raspberry Pi to a Laptop Display

By Sohil Patel

Connect raspberry pi to laptop display DIY Hacking

I came up with this tutorial because one day, my friend Suvigya and I were struggling to work on the Raspberry Pi because we did not have any HD displays. Hence, I came up with this tutorial so others in the same situation as ours would be able to use their laptop display as a monitor for their Raspberry Pi.
As we know, Raspberry Pi is known as the “Pocket Size PC”, but for debugging and project purposes it’s cumbersome to carry an additional display for it. Also, many of us don’t have access to an HDMI display, so, we figured out a way to easily connect a Raspberry Pi to a laptop display. So sit back and enjoy this simple tutorial!


Required Materials

  1. Raspberry Pi.
  2. Ethernet Cable.
  3. Laptop.
  4. SD Card with Raspbian.
  5. Micro USB Cable.

(Optional) Components required for setting it up the first time:

  1. HDMI/ AV Display.
  2. Keyboard and Mouse.

Connect raspberry pi to laptop display DIY Hacking

How Does it Work?

To connect a Raspberry Pi to a laptop display, you can simply use an ethernet cable. The Raspberry Pi’s desktop GUI (Graphical User Interface) can be viewed through the laptop display using a 100Mbps ethernet connection between the two. There are many software programs available that can establish a connection between a Raspberry Pi and your laptop. We used VNC server software to Connect the Pi to our laptop.
Installing the VNC server on your Pi allows you to see the Raspberry Pi’s desktop remotely, using the mouse and keyboard as if you were sitting right in front of your Pi. It also means that you can put your Pi anywhere else in your home and still control it. Also, the internet can be shared from your laptop’s WiFi over Ethernet. This also lets you access the internet on the Pi and connect it to your laptop display.

Setting up your Raspberry Pi

Before moving to connect your Raspberry Pi to your laptop display, you need an SD card with the OS preinstalled, or install Raspbian on a blank SD card. If you’re not familiar with Raspberry Pi commands, check out this tutorial for Basic Linux Commands. You will find lots of blogs and tutorials on preparing an SD card for the Raspberry Pi. If you are a beginner, you can simply download this free beginner’s guide eBook. This will show how to install the OS for the Raspberry Pi. You can also buy SD cards with the Raspian and NOOBs operating systems preinstalled.
After setting up your SD Card, insert it into the Raspberry Pi. Next, connect your micro USB cable to the Raspberry Pi to power it. Also, connect your Raspberry Pi to the laptop via an ethernet cable and connect a keyboard and mouse to it. Now, connect the HDMI display (the HDMI is only required to run the Pi for the first time) and power on your Pi. Follow the next steps to connect your Raspberry Pi to a laptop display.

Sharing Internet Over Ethernet

This step explains how you can share your laptop internet with the Raspberry Pi via Ethernet cable.
In Windows: To share internet with multiple users over Ethernet, go to Network and Sharing Center. Then click on the WiFi network:

Connect raspberry pi to laptop display DIY Hacking

Click on Properties (shown below), then go to Sharing and click on “Allow other network users to connect”. Make sure that the networking connection is changed to “Local Area Connection”:
Connect raspberry pi to laptop display DIY Hacking

Connect raspberry pi to laptop display DIY Hacking

Note: Doing this will provide a dynamic IP to the Ethernet port on your laptop and other devices connected to your laptop. Now, to check the IP assigned to your laptop, click on the new local area connection link created:
Connect raspberry pi to laptop display DIY Hacking
As shown above, the IP assigned to my laptop is To check the IP assigned to the connected ethernet device, do the following. Considering that the IP assigned to your Laptop is and subnet mask is :
  • Open command prompt.
  • Ping the broadcast address of your IP. (Type) Eg: ping
  • Stop the ping after 5 seconds.
  • Check the reply from device: arp –a

Setting up the VNC Server to Connect Your Raspberry Pi to a Laptop Display

If you have an HDMI display: Using the connected HDMI display on your Pi, you should install VNC server on your Raspberry Pi. Open the LX-Terminal and type the following commands to install VNC:
$ sudo apt-get update
$ sudo apt-get install tightvncserver
If you don’t have an HDMI display: If you do not have a display even for one-time setup, then no need to worry. Install Putty as per your Windows configuration and via SSH you can connect with your Raspberry Pi. As you get access to your Pi terminal, run the same commands as above to install VNC.
Starting VNC Server on Pi:
To start VNC, enter the following command in the SSH terminal:
$ vncserver :1
You will be prompted to enter and confirm a password. This will be asked only once, during first time setup. Enter an 8 digit password. Note that this is the password you will need to use to connect to your Raspberry Pi remotely. You will also be asked if you want to create a separate “read-only” password – say no (n).
Yippeee!….The VNC server is now running on your Pi and we can now attempt to connect to it. First, we must switch to the laptop, from which we want to control the Pi. Then set up a VNC client to connect to the Pi.

Setting Up the Client Side (Laptop)

Download VNC client and install it. When you first run VNC viewer, you will see following:

Connect raspberry pi to laptop display DIY Hacking

Enter the IP address of your Raspberry Pi given dynamically by your laptop (you got the address from the earlier step) and append with :1 (denoting port number) and press connect. You will get a warning message, press ‘Continue’:

Connect raspberry pi to laptop display DIY Hacking

Enter the 8 digit password which was entered in the VNC server installation on your Raspberry Pi:

Connect raspberry pi to laptop display DIY Hacking

Finally, the Raspberry Pi desktop should appear as a VNC window. You will be able to access the GUI and do everything as if you were using the Pi’s keyboard, mouse, and monitor directly. As with SSH, since this is working over your network, your Pi can be situated anywhere as long as it is connected to your network.
Connect raspberry pi to laptop display DIY Hacking

Raspberry pi desktop on your laptop display

Running VNC Server During Startup in the Raspberry Pi GUI

Connecting to your Raspberry Pi remotely with VNC is fine as long as your Pi does not reboot. If it does, then you either have to connect with SSH and restart the VNC Server or arrange for the VNC Server to run automatically after the Raspberry Pi reboots. To ensure that the VNC starts automatically each time when booting up, run the following commands in the terminal:
Open “.config” folder from the Pi’s: user folder (it is a hidden folder).
$ cd /home/pi
$ cd .config
Create a folder called “autostart” in it. Also, create a file called “tightvnc.desktop” in that folder. You can use any known text editor to create the files. I used gnome-text-editor for this:
$ mkdir autostart
$ cd autostart
$ gnome tightvnc.desktop
Edit the contents of the file with the following text and save the file:
[Desktop Entry]
Exec=vncserver :1
Now next time you reboot your Pi, vncserver will start automatically and will seamlessly connect your Raspberry Pi to a laptop display. Good job!
Whenever you want to do something with your Pi, just connect it with an ethernet cable to your laptop and power it. Then open VNCViewer, mention the IP address of your Pi, and you can use your laptop’s display as the Raspberry Pi’s monitor.
Recommended Posts
Showing 101 comments
  • merv hackshaw

    would like to connect a 1564 commodore sdiec serial drive to a raspberry pi
    any ideas would be much appreciated

  • Chinnu

    If you don’t have an HDMI display: If you do not have a display even for one-time setup, then no need to worry. Install Putty as per your Windows configuration and via SSH you can connect with your Raspberry Pi.

    once i open the connecttion,i am not prompted to enter anything and the connection is timed out.How do i run commands on the terminal?

    • TIM FIN

      Hi, create a empty file named “SSH” to the root of the sdcard. Then it works. Note: it has to be only SSH, not SSH.TXT or similar.

  • aniket

    please help me. i got everything correct for the first time but when i started the pi again using putty it started showing me connection timed out and the ip scanner was also not able to detect the thread that is the pi via ethernet cable. It’s not able to identify the ip for the pi. Please help me sir

  • Shady

    I have made the changes but every time pi starts it get new address and for it i need to connect to tv to find address.
    i cant connect automatically when i restart pi directly with laptop

  • Mouna.CH

    I want to connect my RPi3 to my laptop wirelessly. Could you help me?

  • Muhammad Jahangeer

    sir please tell me that can we control camera through vnc

    • Michael Visser

      It’s the same as above, just connect the RPi and laptop to the same WiFi network. Skip the “Sharing Internet Over Ethernet” bit as your WiFi router will provide internet access to the RPi :)

  • Joel Flores

    Got up to the point of the password command prompt while setting up the vnc. Will not let me type a password after that.

  • ILFI

    After I remote show like this, i cant click anything

  • Robert

    I can get VNC up and working but not the austostart, I have loaded raspberry PI three times and made sure to the programming.

    Still dose not work.

  • Jeph

    thanks for the help… but have issue making it autostart.
    especially how do i know the name for the text editor … like gnome tightvnc.desktop

    • MyNameJeff

      type ‘nano tightvnc.desktop’ if you don’t have the gnome text editor.

  • sharath

    each and every restart ip of raspberry is changing

    • fakename

      Use ‘’ as the ip, works for me.

  • Wesley

    Hi, I would like to ask how do you configure the microphone? It does not record anything and shows No Translation. And how do you edit the command file? I faces Permission denied problem. By the way, I am using Raspberry Pi 3 model b+ and Logitech Webcam C170. Thank you.

  • Walt Williams

    What if your running Debian on your laptop?

  • Veera Ragav

    Hi… My pi got connected. The desktop is opened in the vnc viewer. But the desktop is empty(fully grey). Right click works which shows some options like terminal emulator, web browser, restart, exit etc., Why cant i see my desktop wallpaper and the icons on it…??

  • Duarte

    Beautiful, it worked for me! Just one thing: do not connect the ethernet cable while the RPI is restaring (otherwise it just keeps on restarting). At least that is what happened to me. Thanks a lot!

    • Tayyab

      So i have a question, i have already configured my pi, summing up all the steps above, if i connect my pi to an Ethernet connection and give that ip address to the VNC server software on my laptop, it should display the raspbian screen right? It worked with putty, just wondering if it will work this way. I did this at my university so i am assuming that my laptop was connected to a wifi and the pi to an ethernet cable and by just giving the ip address of the pi to my the VNC software on my laptop should yield an instant access to the raspbian?

  • su

    whenever i connect to my respberry pi, the screen is duplicating and cannot do anything. how can i solve that?

  • ammy

    great post wanna see more


    Hi Friends,

    I a beginner , starting to use raspberry PI Model B. Connected it to the laptop via HDMI port. Setup Putty, commands worked and everything done. Downloaded VNC. Assigned password for VNC viewer but when I click connect it opens it an array of hundred’s of windows. Please help.

    • Afif Widiyanto Musthofa

      You don’t need the HDMI cables. In fact, it won’t work if you connect those two ports as both are Output ports. We only need the Ethernet connection.

  • Danielle

    Seriously amazing :) thank you so much for a clear tutorial that Just Works!

  • EM Farih

    You’re so amazing… :D

  • Onur

    Can i use it for orange pi pc too?I think that would work for it too.

  • G.Nishanthan

    You are so amazing man.. Worked perfectly….

  • el soonfy

    hi . Dude please help me , i want you to buy me the latest Raspberry Pi with all the connectors needed to power up pi. And tell me how much it cost you. Then i pay you via paypal or western union. Byd way u wil send it to my country.. You have my email. Just tel me if you can do it..pls i wil be waiting. THANKX

  • bob

    Well, My laptop doesn’t have an ethernet port.
    What would I do?

    • bob

      never mind, My laptop does have one

      • Leo Edwards

        It took you a whole day to figure that out? More coffee my man

  • Ratnakar

    Hi, Need help for setting up Raspberry Pi Model B without HDMI port on laptop. I could do step 2 but in step 3 I am not able to connect to board through Putty. Can somebody help me in this.I seeing the below result for command prompt on laptop :

    Pinging with 32 bytes of data:
    Reply from bytes=32 time<1ms TTL=128
    Reply from bytes=32 time<1ms TTL=128
    Reply from bytes=32 time<1ms TTL=128
    Reply from bytes=32 timearp -a

    Interface: — 0xb
    Internet Address Physical Address Type 94-fb-b2-b8-db-d0 dynamic ff-ff-ff-ff-ff-ff static 01-00-5e-00-00-16 static 01-00-5e-00-00-fc static 01-00-5e-7f-ff-fa static ff-ff-ff-ff-ff-ff static

    Interface: — 0xc
    Internet Address Physical Address Type b8-27-eb-e7-d8-87 dynamic ff-ff-ff-ff-ff-ff static 01-00-5e-00-00-16 static 01-00-5e-00-00-fc static 01-00-5e-7f-ff-fa static ff-ff-ff-ff-ff-ff static

    • Afif Widiyanto Musthofa

      Your Raspberry Pi’s address is

  • chirag patel

    Hello Brother,
    i want to interface ATian 3.5 Inch TFT LCD Monitor. i want some steps required for it.

  • Bhavana

    After going to the network and sharing centre –> properties –> sharing i’m not getting that drop down list for networking connection to change it to local area connection. Please help.

  • Mahesh Prasath

    My raspberry pi IP got it through (ifconfig) when I try connecting I get error “host computer refused connection”

  • Zainab Husain

    I’m trying to set up my Raspberry Pi A+ for the first time using this method.
    However, the A+ model doesn’t come with an Ethernet port so I’m using a USB to ethernet port to connect the Pi to the laptop. However, the ethernet dongle doesn’t light up like it usually does on making a connection.
    So when I ping, I don’t get any replies.
    Can anyone suggest anything?

    PS. I’m working without a HDMI cable/monitor.

  • Vinay

    Everything just worked fine but I’am not getting Rpi background instead blank grey screen, where if you right I get pop up menu with terminal, browser options. Is there any method to bring that proper gui?

  • Karthick

    hi bro…I need to display contents on display connected to Raspberry Pi..(like laptop)..the contents are coming from a link…

    Like home automation Project…In that only ON/OFF commands only there…But in my idea,Any contents entered in HTML page..Need to be displayed in DISPlay..So please Guide me..How to Do it..

    Thanks in Advance..

  • Oshan Fernando

    Great job..! It is working. Thank you.

  • Kaustubh Agarwal

    Whenever i try to connect my pi to putty, it says connection refused. Can you tell me how to solve this problem? I am using pi 2

    • J

      This method worked really well until the IP address assigned to my laptop was no longer visible and it chose automatically choose IP address. Any ideas how to get round that?

      • Abrar

        When i’m sharing my internet over LAN, It gives me error..
        “An error occured while Internet connection was being enables. (null)”

        What to do ? Please help.

    • dalky

      I’m a bit late, but SSH is disabled by default in many raspberry pi distros. Unfortunately, this means you actually will need a monitor/keyboard to set up the pi with, which kind of defeats the purpose of that section of this tutorial (there’s no actual way to setup completely “headless”, ie, using only a laptop and no peripherals). You can find more information here:

      • guybruce

        Well, actually there’s a way you could. It seems they disabled SSH in recent Raspbian versions due to security concerns but you can still enable it by copying and empty file called “ssh” in the boot partition (which should be accessible from any machine with an SD card reader) and then rebooting the pi.

        Read this article for more information:

  • gautam

    in the getting the IP address of pi portion how do i stop the ping after 5 seconds.can anybody please elaborate on that part of the essay.

  • franko

    I’m using the default buildroot configuration for the raspberry … I have used an ethernet cable and AngryIpScanner but couldn’t find the pi adress …. I don’t know now how to set up the adress for the pi
    please help

    • Joe

      To do this I plugged my pi into my hun via Ethernet and turned it on.. Then I did a network scan and it came up with it? It didn’t change when I plugged into my laptop so that might work? Or plug it into the hub then SSH it and follow some Internet instructions so it is a static ip? Then it won’t change!

  • saurabh

    mu web browser is not working at all what to do

  • hariprasad

    HI ,

    Its working, but I tried to configure for “autostart”, made the directory and all but once I enter the command “gnome tightvnc.desktop” its showed “Bash: Command not found”
    How can I able to make autostart of VNC server while connecting Rasbi?

  • Abhaya

    As i am learning Raspberry Pi, i found that we need to enable SSH in the advanced setting in raspberry pi before. I didnt found nowhere in this tutorial that SSH is enabled; as by default it is disabled in raspberry pi setting. If it isn’t enabled, can we setup the connection between putty and raspberry pi. Please make this edit, otherwise cool tutorial(Might be i am wrong). Grt job, thx Arvind.

  • Rahul

    Hi, there i tried the all above steps as specefied in the above, i was successful complete up to step3(server side), but at the client (my laptop) when i try to connect through the vnc it is giving an error as “server refused the connection”.
    Pleas some one help…
    Thank you.

  • Raj


    Great summary. It works fine for me. One more question. How can i get Audio thru the VNC connection?

  • benjotitus

    could i use xming

  • benjotitus

    unable to connect
    showing network error in putty

  • Jose Cueva

    Your method works fine for me,
    I was using Xming a time ago, it was getting slower and with screen resolution problems, i did not get a solution for this.
    Using VNC seems a good and better alternative,
    Actually i am using a wifi module with my raspberry.

    Thank you

  • Rio Cruz

    Hi! I got the rpi 2 and installed ubuntu mate. I was able to view my pi using this tutorial, however I recently found out that each time i connect my rpi2 to my laptop ethernet the IP address changes. how will I know the pi’s IP address so I can connect via putty? Is there any way I can set-up a static ip address? It would be nice to share both internet and display to the rpi2. please help.

  • Sultan

    PUTTY shows network error: connection refused

  • Sultan

    In step 2 in Wireless network properties window there is no such field as sharing only for LAN.
    How can i fix it?

  • priyank

    Thank you helps a lot.

  • A

    No HDMI cable any way to set it up for the first time?

  • Abhiram

    I have a Raspberry Pi Model B that I’m trying to connect with my Windows 7 laptop using the above steps.
    I made it to Step 3 and was able to connect to the Pi through Putty.
    After logging in, I tried to install tightvncserver using the following commands-
    sudo apt-get update
    sudo apt-get install tightvncserver

    However, I got error messages for both commands. Screenshot of error messages –

    • Prem

      Hi, the error means your Pi is not getting internet connection. It is getting failed to ping the server of Raspberry Pi. Check the internet connection. How you have connected the Pi to internet?

  • A.S

    I have a raspberry pi model B,and i installed rasbian using NOOBS , hooked it to my TV and it showed the rasberry pi desktop successfully. But when i hook it to my laptop it wont show anything,are there any setting i should do? or any support software i should download?
    Please help!!!!

  • sami


    Will you be able to use the laptop normally when you unplug the raspberry or after you have plunged it in you can only use it for the raspberry???????

    • Arvind Sanjeev

      Yes, you can use the raspberry pi and the laptop simultaneously. On the laptop, there will be a window through which we access the raspberry pi.

  • Shivam

    Thanks a lot Sohil! Seamless tutorial and worked on the first try.

  • keerthana p

    can i use a idea net setter as an Ethernet cable?

  • Woodland

    Well written blog, Nice layout and interesting to read. Good luck.

    My question:
    Your blog says “Keyboard and mouse” are optional, and step 1 says “connect the Keyboard and Mouse”.

    How do I go about – “without” using keyboard and a mouse to begin with. I am a beginner.

    • Arvind Sanjeev

      Initial setup would require using the keyboard and mouse.

  • gouri

    how can i share my laps wifi to pi with putty and xming …. i used this to connect to my pi and lap…bt not able to share internet

    • Arvind Sanjeev

      Hi Gouri,
      If your lap has wifi, then this method would definitely share internet with the pi too.

  • OBH

    I could not find the raspberry pi IP address, I had to found out from the raspberry using the display by typing : hostname -I on the LX Terminal.

    • Arvind Sanjeev

      Use the command: ifconfig

    • hari

      use command “ipconfig”

  • lethaian

    I have stuck in the step 4 but finally i got a solution. You just have simply type “ifconfig” in raspberry to see its IP and then type it to the VNC. It should work ! (sorry for my bad English)

  • rashi

    Open command prompt.
    Ping on broadcast address of your IP. (Type) Eg: ping

    when i ping, it works fine; but any other address such as do not work and say “request timed out”.

  • deependra

    How to change network connection to LAN .Tried lot of YouTube. Tutorials but still have a

  • Tushar Thakur

    Why don’t you use simple Remote Desktop client? Windows inbuilt and also having Android app. Very handy. No need of that VNC client.

    • Jeff

      simple to install and much easier to use:
      sudo apt-get install xrdp

      • Robert Schley

        Awesome. Thanks! I was able to set this up using the xrdp. It looks like the xrdp uses the tightvnc libraries anyway but is simpler.
        To add to this, I was able to not have to find the the ip address by just putting the name of the device ‘raspberrypi’ into the rdp connection detail window from my windows laptop.
        Even if you do need to find the IP, I recommend “angry IP scanner”.
        thanks again.

        • Arvind Sanjeev

          Thanks for the cool feedback Robert :)

          • Abhijeet

            Thanks Robert.I was going through the blog, things were not working for me, I came across this comment so I downloaded ‘Angry IP Scanner’ connected r-pi to my lapi found its IP and directly copied it to ‘Putty.exe’ and it worked!! No vcu or any initialization required as mentioned. Thanks People!!!

  • Anand Krishnan

    When i tried to connect internet via ethernet cable to Pi.The browser showed couldn’t locate host.The orange and green indication is on in LAN port of pi.When i tried same connection in Laptop it worked fine.But host error is showing in Pi.What is the problem ?

pingbacks / trackbacks

Leave a Comment

78 + = 79

Start typing and press Enter to search