文章目录
一些设置
手动更换源
- 备份原来的源:
cp /etc/apt/sources.list /etc/apt/sources.list.bak
- 将源的内容设置为阿里云镜像:
sudo vim /etc/apt/sources.list
内容改为:
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
- 更新软件列表:
sudo apt update
sudo apt upgrade
也可以去网上搜其他镜像,在我这边经测试阿里云是最快的。另外也可以在图形桌面环境下打开Software & Updates软件,在里面也有网速测试并选择最佳源的功能。
一键换源工具:oh-my-tuna
wget https://tuna.moe/oh-my-tuna/oh-my-tuna.py
# For yourself
python oh-my-tuna.py
# ...or for everyone!
sudo python oh-my-tuna.py --global
# Get some help
python oh-my-tuna.py -h
Ubuntu休眠后无法唤醒黑屏
sudo apt-get install laptop-mode-tools
vim /etc/laptop-mode/laptop-mode.conf
#将 ENABLE_LAPTOP_MODE_ON_BATTERY、ENABLE_LAPTOP_MODE_ON_AC、ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED 几个选项设置为1
sudo laptop_mode start
cat /proc/sys/vm/laptop_mode
#为2表示开启成功
ubuntu 18.04-设置合上笔记本盖子不休眠
参考:https://blog.csdn.net/z952957407/article/details/111165219
编辑下列文件:
sudo vim /etc/systemd/logind.conf
然后将其中的:
#HandleLidSwitch=suspend
改成下面,去掉“#”号:
HandleLidSwitch=ignore
最后重启服务:
service systemd-logind restart
PS:
- #HandlePowerKey按下电源键后的行为,默认power off
- #HandleSleepKey 按下挂起键后的行为,默认suspend
- #HandleHibernateKey按下休眠键后的行为,默认hibernate
- #HandleLidSwitch合上笔记本盖后的行为,默认suspend
一些软件
一键换源工具:oh-my-tuna
wget https://tuna.moe/oh-my-tuna/oh-my-tuna.py
# For yourself
python oh-my-tuna.py
# ...or for everyone!
sudo python oh-my-tuna.py --global
# Get some help
python oh-my-tuna.py -h
截图工具:flameshot
安装:
sudo apt install flameshot
快捷键配置:
亮度调节工具:Brightness Controller Simple
参考:https://blog.csdn.net/weixin_44120025/article/details/118875998
sudo add-apt-repository ppa:apandada1/brightness-controller
sudo apt-get update
sudo apt-get install brightness-controller-simple