树莓派常用安装包安装指令

开机自启
实现开机pi身份登陆后,启动脚本
在/home/pi/.bashrc中添加脚本即可
禁用屏幕休眠
图形界面操作
输入如下指令禁用屏幕休眠
xset dpms 0 0 0
xset s off
">xset dpms 0 0 0 xset s off 
屏幕唤醒:xset dpms force on
xset其他操作
指令
说明
xset s off
禁用屏幕保护
xset s 3600 3600
设置空闲时间为1小时
xset -dpms
关闭 DPMS
xset s off -dpms
禁用 DPMS 并阻止屏幕进入空闲
xset dpms force off
立即关闭屏幕
xset dpms force standby
强制屏幕进入待命状态
xset dpms force suspend
强制屏幕进入暂停状态
终端界面操作
输入指令setterm -blank 0 -powerdown 0
修改HDMI分辨率
编辑文件sudo nano /boot/config.txt
修改如下
hdmi_drive=2
hdmi_group=2
hdmi_mode=42
">hdmi_drive=2 hdmi_group=2 hdmi_mode=42 
1024*600分辨率设置如下:
# overscan.
#framebuffer_width=1024
#framebuffer_height=600

#hdmi_ignore_edid=0xa5000080
hdmi_cvt=1024 600 60 3 0 0 0

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2
hdmi_mode=87
"># overscan. #framebuffer_width=1024 #framebuffer_height=600 #hdmi_ignore_edid=0xa5000080 hdmi_cvt=1024 600 60 3 0 0 0 # uncomment to force a specific HDMI mode (this will force VGA) hdmi_group=2 hdmi_mode=87 
修改镜像源
编辑文件nano /etc/apt/sources.list
修改如下
#清华园
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
">#清华园 deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi 
编辑文件sudo nano /etc/apt/sources.list.d/raspi.list
替换
deb http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui
deb-src http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui
">deb http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui deb-src http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui 
更新apt-get:sudo apt-get update
kali系统自动登陆
编辑文件nano /etc/lightdm/lightdm.conf
取消这两行注释并修改
autologin-user=root
autologin-user-timeout=0
">autologin-user=root autologin-user-timeout=0 
编辑文件nano /etc/pam.d/lightdm-autologin允许root自动登陆
注释掉下面一行
#auth      required pam_succeed_if.so user != root quiet_success - 注释掉这一行
">#auth required pam_succeed_if.so user != root quiet_success - 注释掉这一行 
安装kali所需文件apt update && apt install kali-linux-all
安装中文输入法
安装中文字体
sudo apt-get install ttf-wqy-zenhei
">sudo apt-get install ttf-wqy-zenhei 
安装中文输入法
sudo apt-get install fcitx fcitx-googlepinyin fcitx-module-cloudpinyin fcitx-sunpinyin
">sudo apt-get install fcitx fcitx-googlepinyin fcitx-module-cloudpinyin fcitx-sunpinyin 
树莓派安装字体
将字体文件复制到/usr/share/fonts/truetype
输入命令mkfontscale
输入命令mkfontdir
输入命令fc-cache -fv
重启
python包安装
pip安装sudo apt-get install python3-pip
pyqt5安装sudo apt-get install python3-pyqt5
beautifulsoup4安装sudo pip3 install beautifulsoup4
lxml安装sudo pip3 install lxml
generated by haroopad

发布了12 篇原创文章 · 获赞 2 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/y15713080686/article/details/80553907