1,命令行调整:
cat /etc/default/grub sudo vim /etc/default/grub sudo update-grub sudo reboot
2,设置用户自动登陆; 否则无法自动接入wifi
3,设置自动锁屏;
1,添加系统服务;
A ,对于树梅派,strech lite os,可以直接将 autohots.service 服务配置 直接扔到 /etc/systemd/system/multi-user.target.wants/目录,修改 777 权限; 重启系统就会自动启动;
B ,对于linux mint 19.3,需要将 autohots.service 服务配置 扔到 /etc/systemd/system/ 目录下;建立软链接 到 multi-user.target.wants 下; 重启系统就会自动启动;
等效的操作命令:
1)编辑服务配置
sudo vim /etc/systemd/system/autohots.service
2,粘贴如下内容
[Unit] Description=raspberry auto update hots to database Documentation=http://liuzongandy.com After=rc-local.service After=network.target [Service] Type=simple PIDFile=/run/autohots.pid User=root Restart=on-failure RestartSec=3s ExecStartPre=/usr/bin/test /home/andy/go/src/awesomeAdminVue/wesomeAdmin ExecStart=/home/andy/go/src/awesomeAdminVue/wesomeAdmin ExecReload=/bin/kill -s HUP $MAINPID ExecStop=/bin/kill -s QUIT $MAINPID [Install] WantedBy=multi-user.target
3,服务管理
sudo systemctl enable autohots.service sudo systemctl start autohots.service sudo systemctl stop autohots.service sudo systemctl restart autohots.service sudo systemctl disable autohots.service sudo systemctl daemon-reload systemctl status autohots.service 等价纯手工: cp autohots.service /etc/systemd/system/ cd /etc/systemd/system/ cd /etc/systemd/system/multi-user.target.wants/ sudo ln -s /etc/systemd/system/autohots.service autohots.service sudo chmod 777 /etc/systemd/system/multi-user.target.wants/autohots.service sudo reboot
4, ALT+F12 可以将当前窗口钉到最前面