欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
HOW-TO:Set up Wake-On-Lan (Ubuntu)
 
Linux
HOW-TO:Set up Wake-On-Lan (Ubuntu)

If you are not one of the lucky ones with a built-in start-up controller (so that the remote can be used to start the computer) or if the computer is in the other room/floor, sometimes it's pretty annoying to go to the upstairs, for example, just to push a button. Wake-On-LAN (WOL) is a network standard, which provides the ability to switch on remote computers through special network packets, called Magic Packet from sleeping, hibernating, or powered-off state. It only works with Wake-On-LAN compliant BIOS and NIC.

Contents

 [hide

1 Before we start

First of all, the motherboard should support Wake-On-LAN and it should be enabled in the BIOS.

Different BIOSs and motherboards do this differently; for example on the ASUS P5N7A-VM, it's under Power > APM Configuration and in there Resume On PCIE Wake and Resume On LAN(MAC) should be enabled.

2 Enabling WOL in the OS

Even though Wake-On-LAN works in network layer 2, OS support is still one of the important things to make it work. Even if you see the Ethernet port LED is on after the halt/shutdown, the OS shuts off the Ethernet internally. One must tell Ethernet controller to WOL when boots up and tell "halt" script not to bring down controller during shut-down.

2.1 Install ethtool

One of the easiest applications to use to enable Wake-On-LAN is ethtool. Install it with:

sudo apt-get install ethtool

2.2 Setup ethtool WOL options

Run the following command to enable it on ethX (where X is the Ethernet device number).

sudo ethtool -s eth0 wol g
  • Note: Not all devices support this.

The settings can be verified by running:

sudo ethtool eth0
 Settings for eth0: 	Supported ports: [ MII ] 	Supported link modes:   10baseT/Half 10baseT/Full  	...         ... 	Supports Wake-on: g 	Wake-on: g 	Link detected: yes
  • Note: "g" indicates wake on Magic Packet is enabled

2.3 Enable ethtool on Start-up

To have an application or service is running on startup, Ubuntu uses Upstart scripts which replace the old init scripts.

The following commands; create wakeonlan.conf with the upstart code to run wakeonlan (as per example above), set the file to exectuable, and start the service[1]:

sudo bash -c "cat > /etc/init/wakeonlan.conf" <<'EOF'start on started network script    interface=eth0    logger -t 'wakeonlan init script' enabling wake on lan for $interface    ethtool -s $interface wol gend scriptEOF

sudo chmod +x /etc/init/wakeonlan.conf

sudo service wakeonlan start

3 Waking with Magic Packet

Wake-on-LAN is platform-independent; any application that sends "magic packets" can wake up computers from shutdown state (as long mains power is not off) regardless of the OS it boots into afterwards.

The following steps are for setting up a Wake-on-LAN application on Ubuntu but there are many applications available, including for Windows and Mac OS X, that accomplish the same task.

Install our Wake-on-LAN application, in this case powerwake, as it has IP and hostname options.

sudo apt-get install powerwake

The simplest usage of powerwake is to just supply the IP address or hostname of the machine you want to wake:

powerwake 192.168.1.1

powerwake xbmc-hostname.local
  • Note: To enable powerwake to cache the remote machine MAC address you may need to run it once with the remote machine awake.

If everything goes well, as described above, you should now be seeing the machine in the other room booting up.

4 Finishing Touches

4.1 Aliases

You can make it even easier to run the above application from the command line or other scripts. One way is to include aliases to it in your .bashrc file, found in your user's home directory. Open the file in your preferred text editor and scroll to the bottom of the file, then add one or more of the lines below, depending on what you need to do.

nano ~/.bashrc

# User Defined Aliasesalias htpcwol="powerwake xbmc-hostname.local"alias htpcssh="powerwake xbmc-hostname.local; ssh user@xbmc-hostname.local"

Save and exit, then run the following to reload it (normally loaded automatically at startup):

source ~/.bashrc

You will now have two new commands (aliases) available for use from the command line; the first alias htpcwol simple wakes the host up remotely and the second one htpcssh also wakes it up but then creates an SSH session to the remote machine.

Aliases are a huge time saver if you use the command line for remote access often and there are many examples on the internet.[2]

4.2 Suspend or Hibernate from command line

To suspend the remote machine from within an SSH session set the suspend command to run several minutes in the future:[3]

echo 'pm-suspend' | sudo at now + 3 minutes

You can then disconnect safely from the SSH session and the remote machine will suspend at the set time.

4.3 Using the XBMC Remote Control

It took me some time to figure out why my XBMC did not wake up from shutdown. Commands to shutdown systems often work best when issuing them against MAC addresses. If you are using the XBMC Remote Control app on the iPad or iPhone, you must supply the MAC address (or: HWaddr) of your NIC in the setup. I can now shutdown and startup XBMC from the app.

To find out the HWaddr on XBMCbuntu use this command:

ifconfig | grep HWaddr

5 References

  1. http://askubuntu.com/questions/47918/how-can-i-enable-wake-on-lan-permanently
  2. http://www.howtogeek.com/73768/how-to-use-aliases-to-customize-ubuntu-commands/
  3. http://askubuntu.com/questions/35719/how-do-i-suspend-over-ssh
本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
WOL 遠端喚醒
 centos及ubuntu網(wǎng)絡(luò )喚醒(使用命令開(kāi)機)
如何自動(dòng)喚醒和關(guān)閉 Linux
在Linux下通過(guò)Wake On LAN實(shí)現網(wǎng)絡(luò )喚醒遠程開(kāi)機
如何配置被控端實(shí)現遠程開(kāi)機?
網(wǎng)絡(luò )遠程喚醒 WOL Magic Packet
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久