Linux change archive mirror All In One
Posted xgqfrms
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux change archive mirror All In One相关的知识,希望对你有一定的参考价值。
Linux change archive mirror All In One
Linux / Debian / Ubuntu / Raspberry Pi OS
$ sudo apt-get update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Get:2 http://security.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://archive.raspberrypi.org/debian bullseye InRelease [23.6 kB]
Get:5 http://security.debian.org/debian-security bullseye-security/main armhf Packages [232 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main armhf Packages [12.0 kB]
Get:7 http://deb.debian.org/debian bullseye-updates/main arm64 Packages [12.0 kB]
Get:8 http://archive.raspberrypi.org/debian bullseye/main armhf Packages [316 kB]
Get:9 http://archive.raspberrypi.org/debian bullseye/main arm64 Packages [308 kB]
Get:10 http://security.debian.org/debian-security bullseye-security/main arm64 Packages [232 kB]
Get:11 http://security.debian.org/debian-security bullseye-security/main Translation-en [155 kB]
Fetched 1383 kB in 19s (72.9 kB/s)
Reading package lists... Done
install
# 安装 vim
$ sudo apt-get install vim
# 安装中文输入法 chinese input
$ sudo apt-get install scim-pinyin
# 重启系统
$ sudo reboot
# 或者
$ sudo shutdown -r now
test
# static ip
$ vim dhcpcd.conf
# disk free
$ df
$ df -h
$ df -Th
https://www.raspberrypi.com/documentation/computers/configuration.html#configuring-networking-2
https://www.raspberrypi.com/documentation/computers/configuration.html#static-ip-addresses
demos
切换 Linux 镜像源 / 切换 Raspberry Pi 镜像源
$ sudo apt-get update
获取:1 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
获取:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
正在读取软件包列表... 完成
E: 仓库\'http://archive.raspberrypi.org/debian buster InRelease\'将其\'Suite\'值从\'testing\'修改到了\'oldstable\'
N: 为了让这个仓库能够应用,这必须在更新之前显式接受。更多细节请参阅 apt-secure(8) 手册。
E: 仓库\'http://raspbian.raspberrypi.org/raspbian buster InRelease\'将其\'Suite\'值从\'stable\'修改到了\'oldstable\'
N: 为了让这个仓库能够应用,这必须在更新之前显式接受。更多细节请参阅 apt-secure(8) 手册。
$ sudo vim /etc/apt/sources.list
$ sudo cat /etc/apt/sources.list
# new ✅
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi
# tsinghua 不好使 ❌
# deb http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui
# deb-src http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui
# old ❌
# deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
# Uncomment line below then \'apt-get update\' to enable \'apt-get source\'
#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
$ sudo vim /etc/apt/sources.list.d/raspi.list
$ sudo cat /etc/apt/sources.list.d/raspi.list
# new ✅
deb http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/ buster main
# old ❌
#deb http://archive.raspberrypi.org/debian/ buster main
# Uncomment line below then \'apt-get update\' to enable \'apt-get source\'
#deb-src http://archive.raspberrypi.org/debian/ buster main
USTC Open Source Software Mirror
中国科学技术大学
获取 IP 通过 SSH 访问 Raspberry Pi
# 获取 IP
$ ping raspberrypi
# SSH, host ✅
$ ssh pi@raspberrypi.local
# SSH, ip ❓
$ ssh pi@192.168.18.135
➜ ~ ping raspberrypi
ping: cannot resolve raspberrypi: Unknown host
➜ ~ ping raspberrypi.local
PING raspberrypi.local (192.168.18.135): 56 data bytes
64 bytes from 192.168.18.135: icmp_seq=0 ttl=64 time=207.268 ms
64 bytes from 192.168.18.135: icmp_seq=1 ttl=64 time=13.262 ms
^C
--- raspberrypi.local ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 13.262/110.265/207.268/97.003 ms
➜ ~ ssh pi@192.168.18.135
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ED25519 key sent by the remote host is
SHA256:RDtJTesQX/nQU+4pRcsqtQFV5kXbdM05U5gppFpG2dU.
Please contact your system administrator.
Add correct host key in /Users/xgqfrms-mm/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/xgqfrms-mm/.ssh/known_hosts:4
Host key for 192.168.18.135 has changed and you have requested strict checking.
Host key verification failed.
➜ ~ ssh pi@raspberrypi.local
pi@raspberrypi.local\'s password:
Permission denied, please try again.
pi@raspberrypi.local\'s password:
Permission denied, please try again.
pi@raspberrypi.local\'s password:
Linux raspberrypi 5.15.84-v8+ #1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023 aarch64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Apr 10 01:38:46 2023
SSH is enabled and the default password for the \'pi\' user has not been changed.
This is a security risk - please login as the \'pi\' user and type \'passwd\' to set a new password.
pi@raspberrypi:~ $
(FTP连接Linux时报cannot change directory错误的解决办法
原因:
Linux系统的SELinux安全策略默认没有开启访问FTP不同目录的支持
使用Linux命令:getsebool -a | grep ftp 查看状态
如果看到 ftp_home_dir --> off (表示SELinux没有开启访问不同目录的支持)
解决办法两个(任选其一):
直接关闭SELinux安全策略
打开文件: /etc/selinux/config 修改 SELINUX = disabled
重启机器后生效,重启机器命令:reboot
2. 打开用户访问不同目录的支持
执行Linux命令:setsebool -P ftp_home_dir 1
重启vsftpd服务:service vsftpd restart
本文出自 “java学习笔记” 博客,请务必保留此出处http://282845781.blog.51cto.com/7152559/1786672
以上是关于Linux change archive mirror All In One的主要内容,如果未能解决你的问题,请参考以下文章
yum安装提示错误“Error downloading packages: 32:bind-chroot-9.9.4-14.el7.x86_64: [Errno 256] No more mirr
FTP连接Linux时报cannot change directory错误的解决办法
原因:
Linux系统的SELinux安全策略默认没有开启访问FTP不同目录的支持
使用Linux命令:getsebool -a | grep ftp 查看状态
如果看到 ftp_home_dir --> off (表示SELinux没有开启访问不同目录的支持)
解决办法两个(任选其一):
直接关闭SELinux安全策略
打开文件: /etc/selinux/config 修改 SELINUX = disabled
重启机器后生效,重启机器命令:reboot
2. 打开用户访问不同目录的支持
执行Linux命令:setsebool -P ftp_home_dir 1
重启vsftpd服务:service vsftpd restart
本文出自 “java学习笔记” 博客,请务必保留此出处http://282845781.blog.51cto.com/7152559/1786672
以上是关于Linux change archive mirror All In One的主要内容,如果未能解决你的问题,请参考以下文章
yum安装提示错误“Error downloading packages: 32:bind-chroot-9.9.4-14.el7.x86_64: [Errno 256] No more mirr