赞
踩
sudo passwd root
su root
将以下语句注释掉
auth required pam_succeed_if.so user != root quiet_success
nano /root/.profile
注释mesg n 2 > /dev/null || true
加上tty -s && mesg m || true
安装openssh后修改文件
nano /etc/ssh/sshd_config
注释permitRootLogin prohibit-password
添加上PermitRootLongin yes
sudo passwd -dl root
sudo apt-get install openssh-server
sudo systemctl enable ssh
- #单次开启ssh
- sudo systemctl start ssh
- #单次关闭ssh
- sudo systemctl stop ssh
- #重启ssh
- service ssh restart
- #查看ssh是否启动,看到Active: active (running)即表示成功
- sudo systemctl status ssh
nano /etc/apt/sources.list
- deb https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
- deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
- deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
- deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
- deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
- deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
- deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
- deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
- deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
- deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
apt update -y && apt upgrade -y
systemctl
start | 启动服务 |
stop | 停止服务 |
restart | 重启服务 |
enable | 设置服务开机自启 |
disable | 取消服务开机自启 |
status | 查看服务状态 |
list | 显示所有一起动服务 |
nano /etc/systemd/logind.conf
HandleLidSwitch=suspend
:当笔记本电脑使用电池供电时,合盖挂起HandleLidSwitchExternalPower=suspend
:当笔记本电脑插入电源插座时,合盖挂起HandleLidSwitchDocked=ignore
:当笔记本电脑连接到扩展坞时,合盖忽略相关设置:
suspend
:合盖时挂起lock
:合盖时锁定ignore
:什么都不做poweroff
:关机hibernate
:合盖时休眠如果你不希望你的系统在笔记本电脑盖合上时执行任何特殊操作,我建议你使用 ignore
sudo vbetool dpms off
dpkg-reconfigure tzdata
选择Asia-->Shanghai,确定
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。