Is there any app for lubuntu which has ability to remotely turn on the PC and use it and then tun it off also. I want it as my computer is in NewYork and I want to access some files in my office at Canada. then how can i remotely tun on that pc and download some files. (the pc is always plugged in to mains but not turned on as it will waste electricity)

  • Errr... Unless you have something physically pressing the on button, how can you turn it on? You can turn it off though - wait a second. – Wilf Jan 18 '14 at 18:40
  • Will you be accessing it from another Ubuntu machine, or will it be Windows or something? – Wilf Jan 18 '14 at 18:50
  • Possible Duplicate? askubuntu.com/questions/297198/remotely-turning-on-computer – Mitch Mar 19 '14 at 11:33

Wake-on-LAN (WOL) is an Ethernet computer networking standard that allows a shut-down computer to be turned on remotely. Most recent motherboards that have an integrated Ethernet controller that supports this feature. You can enable the Wake-on-LAN feature in the Power Management section of the motherboard’s BIOS. There are two ways of how Wake-on-LAN can work. The first one is you want to turn on a computer on the same local area network and the second one is you want to turn on a computer in another location through the internet.

This is how Wake-on-LAN works; the target computer is shut down with enough power reserved for the network card to function. The network card listens for a specific packet called the “Magic Packet”. The listening computer receives this packet, checks it for the correct information, and then boots if the Magic Packet is valid. A magic packet is data consisting of “FF FF FF FF FF FF” followed by 16 repetitions of the listening network device’s MAC address.

Setting Up Wake-on-LAN

In order to use WoL it must be supported and enabled as necessary in the BIOS, NIC and other network hardware (routers, switches etc). You may also need to configure some software if things don't work out-of-the-box.

Enabling WoL in the BIOS

This section may differ depending on whether or not you have a NIC integrated into your motherboard.

Using an Integrated NIC

To enable WoL in the BIOS, enter the BIOS setup and look for something called "Wake up on PCI event", "Wake up on LAN" or similar. Change it so that it is enabled. Save your settings and reboot.

Using a Non-Integrated NIC

If your NIC is not integrated into your motherboard, you will still have to configure your BIOS to allow devices to wake up your computer. Boot your computer and enter the BIOS settings menu. In one of the sub-menus there will hopefully be the option to allow USB and/or PCI devices to wake-up the computer. Enable the setting that is appropriate for your NIC. Save your settings and reboot.

PCI NICs sometimes require a cable connection to the power supply in order to stay awake when the computer is off/asleep. Check your manual to see if yours does and install if necessary

Enabling WoL in the NIC

First, determine which NIC will be used, and then check whether it supports the Magic Packet™ using

sudo ethtool <NIC>

where is the device name of your NIC, e.g. eth0. This command will output some information about your the capabilities of your NIC. If this output contains a line similar to the following:

Supports Wake-on: <letters>

where contains the letter g, the NIC should support the WoL Magic Packet™ method (for the other letters look at man ethtool).

Enabling WoL in the NIC

To check whether WoL is enabled in the NIC, one could use

sudo ethtool <NIC>

and look for

Wake-on: <letters>

If contains g and not d, then Magic Packet™ is enabled. However, if does contain d, WoL needs to be enabled by running the following command:

sudo ethtool -s <NIC> wol g

On most systems, issuing this command is required after each boot. If the system's networking is configured via ifupdown, then it is easy to add the line up ethtool -s wol g below the interface's configuration stanza in /etc/network/interfaces. For example:

shahar@shahar-backup:~$ cat /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface

auto lo iface lo inet loopback
# The primary network interface

auto eth0 iface eth0 inet static
        up ethtool -s eth0 wol g

This will ensure that WoL is enabled in the NIC on each boot. Fore more information see the interfaces manual.

Sources blog from raymond.cc & Ubuntu help

Tools to help set this up, configure and/or use:


Installation: sudo apt-get install gwakeonlan or click this button

Install via the software center

enter image description here

enter image description here

Images from ubuntugeek and that site also has a summary:

Requirements to allow gWakeOnLan to turn on a machine all these requirements must be met. Each machine to turn on must:

  • have an integrated (or PCI/PCIE) Ethernet network card.
  • have the network cable plugged all the time.
  • have the power cable plugged all the time.
  • support the Wake On LAN with the Magic Packet.
  • have the Wake On LAN enabled in the BIOS.
  • have the Wake On LAN by Magic Packet enabled in the Operating System.
  • be powered off from the Operating System.

If one or more of these requirements is not met all the time, the Wake On LAN will not work.

  • I forgot about Wake On LAN .... – Wilf Jan 18 '14 at 19:04
  • 1
    @wilf you did you did! :+) – Rinzwind Jan 18 '14 at 19:07
  • no, i don thave network cable plugged everytime, any other way? – user204653 Mar 14 '14 at 11:08

First install an ssh server on the remote machine you want to access:

sudo apt-get install openssh-server 

You will also need to install a program to download stuff, if it is not already installed:

sudo apt-get install wget

Get another machine on the same network, running Ubuntu, and try sshing into the remote machine


You can also 'ssh' from Windows, Mac etc, but you can find out how to do that of the internet - sorry.

The USERNAME entry is your username on that computer - you should see it when you open terminal, before the @.
The IP address you need to use now is your local IP on that machine - see here on that.

If it works, you may want to run a test download. First change the terminal so it is in the `~/Downloads directory, so anything downloaded will end up in that folder.

cd ~/Downloads

Then you can try downloading this image: enter image description here

 wget http://i.stack.imgur.com/cD3Xo.png

You can then shut it down by using:

sudo shutdown -h now

To copy files from that computer to another, use the test machine to try this again, in nearly exactly the same way as with the ssh command earlier, and will be tested with the file downloaded via wget:

scp USERNAME@IP_ADDRESS:/home/USERNAME/Downloads/cD3Xo.png helloworld.png

This will copy the file through ssh to helloworld on the test machine.

After you have tested it on the local netowrk, you then need to access it from outside it. First set up port forwarding on your router . This means that any request sent to the router will be diverted to your machine. Get it to be sent to the local IP address of that machine, allow SSH, etc.

After that, run this to find the external IP of your network:

wget http://smart-ip.net/myip -O - -q ; echo

Then you can test it. For this you need a machine outside your local network, for example an Android phone with ConnectBot on it. You can use it as explained earlier, but this time with the external IP address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy