# 常用系统命令

  • 查看系统版本号
lsb_release -a

cat /proc/version

umane -a
1
2
3
4
5
  • 查看CPU温度
/opt/vc/bin/vcgencmd measure_temp

cat /sys/class/thermal/thermal_zone0/temp
1
2
3

# 修改树莓派的apt软件源

sudo nano /etc/apt/sources.list
1
deb http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main non-free contrib rpi
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main non-free contrib rpi
1
2
// 更新软件索引清单
sudo apt-get update
 
// 比较索引清单更新依赖关系
sudo apt-get upgrade -y
1
2
3
4
5
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
1
2
3
4
sudo apt-get update
sudo apt-get -y upgrade
1
2

# 树莓派修改音频输出至3.5mm耳机孔

 sudo amixer cset numid=3 1
1

# 安装xrdp

使用自带的的源安装

apt-get install xrdp -y
1

# 使用aptitude

  • 使用aptitude
apt-get install aptitude
1

# 解决apt-get update问题

sudo apt-get update

E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
1
2
3
4

表明当前有某个进程正在apt-get,然而我并没有使用任何命令,于是需要kill掉进程。

解决方法是:

sudo rm /var/lib/apt/lists/lock
1
上次更新时间: 2024年2月14日星期三上午10点24分