Raspi config
Start VNC and SSH
Enter the terminal of raspi, sudo raspi-config
,and start vnc and ssh with the UI interface.
Alternatively, after you flashed the SD card with raspi os, create a file named ssh
(no filename extension, just ssh
) at the root of the directory, and SSH will be automatically enabled during the first system startup.
‘Remote host identification changed’ error
When connecting to raspi (or any other ssh hosts) with ssh, if the following error happens:
The solution is to use the following command (replace <IP_ADDRESS>
with the IP address of raspi), and connect again
1 |
|
apt-get切换国内源
首先查看linux(树莓派os为debian)版本:lsb_release -a
,版本可能是buster或bullseye
然后看一下清华源地址:
https://mirrors.tuna.tsinghua.edu.cn/help/debian/
https://mirrors.tuna.tsinghua.edu.cn/help/raspbian/
似乎只有64位的raspberrypi os才能使用这个源,32位的系统请勿使用,会出错。
内容(可以去访问查看,也可以直接复制下面的文字):
1 |
|
把这段文字复制下来,然后更改sources.list
文件。这个文件的位置在:/etc/apt/sources.list
。可以用sudo vim
或者 mousepad 去打开修改。
更改文件完成后,shell执行sudo apt-get update && sudo apt-get upgrade -y
,更新这个配置文件并更新所有的包,等待一会儿就完成了!这样apt-get的速度就会快很多。
Install vim
1 |
|
Install zsh and oh my zsh
For reference: mintimate
1 Install zsh and set it as the default terminal
Install zsh:sudo apt-get install zsh
See the path of zsh: which zsh
, which should be /bin/zsh
or /usr/bin/zsh
Set it as the default shell:chsh -s /bin/zsh
, restart terminal or restart system to take effect
2 Install ‘oh my zsh’
One-click setup script:
1 |
|
switch theme:
1 |
|
vim code highlighting, line number display…
1 |
|
See CPU usage:
1 |
|
禁止息屏(?):
1 |
|