debian 笔记本做服务器关闭屏幕

作者:小鱼的互联网观察 发布时间:March 13, 2021 分类:互联网观察

开启  

 /etc/rc.local 文件


自己创建 /etc/rc.local 这个文件的, 因为debian10默认是没有,使用 vim /etc/rc.local创建,里面的内容是我复制的,主要就是把第一句(#!/bin/sh -e) 和 最后一句(exit 0)写进去即可。

==============================================================

#!/bin/sh -e

#

# rc.local

#

# This script is executed at the end of each multiuser runlevel.

# Make sure that the script will "exit 0" on success or any other

# value on error.

#

# In order to enable or disable this script just change the execution

# bits.

#

# 增加下面这行代码.

setterm -blank 1 -powersave powerdown,

exit 0

————————————————

#执行下面代码

sudo chmod +x /etc/rc.local

#执行下面代码

ln -s /lib/systemd/system/rc.local.service /etc/systemd/system/

#执行下面代码

systemctl enable rc.local

#执行下面代码

systemctl start rc.local.service

不出意外 重启后。。你的服务器会在1分钟后关闭屏幕。


标签: none

互联网观察
debian 笔记本做服务器关闭屏幕
本文地址:http://www.tianmeng.org/archives/475/

相关文章

  • 无相关文章
文档信息

当前暂无评论 »

网站地图 京ICP证030173号