Raspbian-based Raspberry Pi configuration of 3B +

Change the source file (sources.list)

To replace the source file we must first understand what is the source file, understand its usefulness and usage, what is the source document? It plays a role in what Linux systems it? When a program is updated, the programmer will upload the new version of the program to the corresponding server, while our system updates, also need to find the server queries. That our system is how to find the server it? When the system receives an update command, the source file will first sources.list after the URL query servers, query the URL to the URL query software needs to be updated, and then will need to update the list of software available to users, and then select updated software.

Although Linux distributions all have this source file, but the corresponding source file server releases mostly in countries and regions where the affected domestic network environment, some foreign websites we can not access or visit is very unstable at this time we want to update our software is very troublesome, or to open the agent updates, or to the internet to find the packages manually update. To overcome this problem, the domestic many institutions in the country to establish a clone of the mirror source, so our domestic system can be updated by the mirror source, currently more famous mirror source are: USTC open mirror sites , Tsinghua open mirror sites , Ali Baba open mirror sites and the like. We just want to change the source file to address these.

In other source before you back up what local source files.

#使用cp复制一份源文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo cp /etc/apt/sources.list.d/raspi.list /etc/apt/sources.list.d/raspi.list.bak


Edit source files, use nano or vim can.

#修改软件更新源
sudo nano /etc/apt/sources.list
#修改系统更新源
sudo nano /etc/apt/sources.list.d/raspi.list

After opening the file source address defaults remove or comment, and then we save the new source address can be selected after pasting.

#中科大软件镜像源
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
#中科大系统镜像源
deb http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/ stretch main ui

And update the system software

#获取更新列表
sudo apt-get update
#更新软件包
sudo apt-get upgrade

Change the root password

#更改root密码
sudo passwd root
#更改pi密码
sudo passwd pi
#切换到root
su root

Guess you like

Origin www.cnblogs.com/c4y345/p/12626047.html