Arm架构系统配置
明天除夕,今年不回家,刚加完班。
ssh连接
不需任何配置直接用ssh root@192.168.110.3 -p9022命令连接,密码:123456
上面的IP地址替换设备IP地址,在命令行中输入ifconfig查看IP地址。

ssh已经配置好了,如果没有高级需求可以不用改动,修改ssh配置文件。
- 修改ssh密码
设置root账号的密码
passwd
输入新的密码
New password:
再次确认密码
Retype new password:

- 查看手机或Arm板卡的ip地址
命令:
ifconfig
假设ip地址为192.168.110.168
- 通过电脑端进行ssh连接
电脑端打开shell连接终端
查看电脑和终端是否可以互相访问,如果不可以请检查网络
命令:
ping 192.168.110.168
将192.168.1.168替换为自己边缘的ip地址
命令:
ssh root@192.168.110.168 -p9022

- 修改ssh端口
ssh的配置文件目录
cd /etc/ssh
vim sshd_config
ssh的配置文件
Port 9022 #修改端口
PermitRootLogin yes #yes允许root账户登录,no不允许
PasswordAuthentication yes #yes允许密码验证登录,no使用密钥登陆
ListenAddress 0.0.0.0 #设置ip地址,无特殊需求最好不改

重启ssh
#修改完配置后需要重新启动ssh
/etc/init.d/ssh restart
#查看ssh运行状态
/etc/init.d/ssh state
apt命令
- 安装软件包
apt-get install package #在线安装软件包
apt-cache serach package #搜索包
apt-cache show package #显示这个包的详细信息,比如大小版本说明等
sudo apt-get install package #在线安装包
sudo apt-get install package --reinstall #重新在线安装这个包
sudo apt-get remove package #删除这个包
sudo apt-get remove package --purge #删除这个包和这个包的相关配置文件
sudo apt-get update #更新源,在安装新的包之间要先编辑对应的源地址
sudo apt-get upgrade #更新与源对应的所有文件包
apt-cache depends package #查看这个包需要依赖的包
apt-cache rdepends package #查看这个包被哪些包所依赖
sudo apt-get build-dep package #安装相关的编译环境
sudo apt-get clean && sudo apt-get autoclean #删除不用的包(清理/var/cacheapt/archive中的deb缓存文件)
sudo apt-get check #检查室友有损坏的依赖包
- 软件安装后相关文件位置
#载的软件包存放位置
/var/cache/apt/archives
#安装后软件默认位置
/usr/share
#可执行文件位置
/usr/bin
#配置文件位置
/etc
#lib文件位置
/usr/lib
- apt-get安装删除包
#安装新的文件一般要编辑对应的源文件,比如:
cat /etc/apt/sources.list #查看使用的源,更新编辑源
sudo apt-get update #更新软件源
sudo apt-get upgrade #更新对应源的所有文件
sudo apt-get install package #安装包
sudo apt-get --reinstall install package #重新安装这个包
sudo apt-get remove package #卸载删除包
sudo apt-get autoremove package #自动卸载软件但保留其配置文件
sudo apt-get autoremove --purge package #自动卸载软件其删除其配置文件
#tips: remove一般用于卸载本地安装的软件,autoremove一般用于在线安装的软件
Service
top命令
top命令可以动态查看进程,监控linux系统状况;是常用的性能分析工具,能够实时显示系统资源各个进程占用状况,如同windows的任务管理器。
top

| 列名 | 含义 |
|---|---|
| PID | 进程id |
| PPID | 父进程id |
| RUSER | Real user name |
| UID | 进程所有者的用户id |
| USER | 进程所有者的用户名 |
| GROUP | 进程所有者的组名 |
| TTY | 启动进程的终端名。不是从终端启动的进程则显示为 ? |
| PR | 优先级 |
| NI | nice值。负值表示高优先级,正值表示低优先级 |
| P | 最后使用的CPU,仅在多CPU环境下有意义 |
| %CPU | 上次更新到现在的CPU时间占用百分比 |
| TIME | 进程使用的CPU时间总计,单位秒 |
| TIME | + 进程使用的CPU时间总计,单位1/100秒 |
| %MEM | 进程使用的物理内存百分比 |
| VIRT | 进程使用的虚拟内存总量,单位kb。VIRT=SWAP+RES |
| SWAP | 进程使用的虚拟内存中,被换出的大小,单位kb |
| RES | 进程使用的、未被换出的物理内存大小,单位kb。RES=CODE+DATA |
| CODE | 可执行代码占用的物理内存大小,单位kb |
| DATA | 可执行代码以外的部分(数据段+栈)占用的物理内存大小,单位kb |
| SHR | 共享内存大小,单位kb |
| nFLT | 页面错误次数 |
| nDRT | 最后一次写入到现在,被修改过的页面数。 |
| S | 进程状态。D=不可中断的睡眠状态 R=运行 S=睡眠 T=跟踪/停止 Z=僵尸进程 |
| COMMAND | 命令名/命令行 |
| WCHAN | 若该进程在睡眠,则显示睡眠中的系统函数名 |
| Flags | 任务标志 |
ps命令
用于显示当前进程的状态
| 列名 | 含义 |
|---|---|
| USER | 该进程是由哪个用户产生的。 |
| PID | 进程的 ID。 |
| %CPU | 该进程占用 CPU 资源的百分比,占用的百分比越高,进程越耗费资源。 |
| %MEM | 该进程占用物理内存的百分比,占用的百分比越高,进程越耗费资源。 |
| VSZ | 该进程占用虚拟内存的大小,单位为 KB。 |
| RSS | 该进程占用实际物理内存的大小,单位为 KB。 |
| TTY | 该进程是在哪个终端运行的。其中,tty1 ~ tty7 代表本地控制台终端(可以通过 Alt+F1 ~ F7 快捷键切换不同的终端),tty1~tty6 是本地的字符界面终端,tty7 是图形终 |端。| pts |/0 ~ 255 代表虚拟终端,一般是远程连接的终端,第一个远程连接占用 pts/0,第二个远程连接占用 pts/1,依次増长。 |
| STAT | 进程状态。常见的状态有以下几种: |
| -D:不可被唤醒的睡眠状态,通常用于 I/O 情况。 | |
| -R:该进程正在运行。 | |
| -S:该进程处于睡眠状态,可被唤醒。 | |
| -T:停止状态,可能是在后台暂停或进程处于除错状态。 | |
| -W:内存交互状态(从 2.6 内核开始无效)。 | |
| -X:死掉的进程(应该不会出现)。 | |
| -Z:僵尸进程。进程已经中止,但是部分程序还在内存当中。 | |
| -< :高优先级(以下状态在 BSD 格式中出现)。 | |
| -N:低优先级。 | |
| -L:被锁入内存。 | |
| -s:包含子进程。 | |
| -l:多线程(小写 L)。 | |
| -+ :位于后台。 | |
| START | 该进程的启动时间。 |
| TIME | 该进程占用 CPU 的运算时间,注意不是系统时间。 |
| COMMAND | 产生此进程的命令名。 |
查看系统中所有进程
ps -aux

查看系统中某个进程的情况
ps -aux

更换apt源
open /etc/apt/sources.list

默认是华为源,可以更换其他源,粘贴复制后记得点击右上方的保存
更换后需要使用apt update命令

- 阿里云镜像站
deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb http://mirrors.aliyun.com/debian-security buster/updates main
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian-security buster/updates main
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
- 清华大学镜像站
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ buster/updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ buster/updates main contrib non-free
- 中科大镜像站
deb https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ buster main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ buster-backports main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free
- 腾讯云镜像站
deb http://mirrors.cloud.tencent.com/debian/ buster main non-free contrib
deb http://mirrors.cloud.tencent.com/debian-security buster/updates main
deb http://mirrors.cloud.tencent.com/debian/ buster-updates main non-free contrib
deb http://mirrors.cloud.tencent.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.cloud.tencent.com/debian-security buster/updates main
deb-src http://mirrors.cloud.tencent.com/debian/ buster main non-free contrib
deb-src http://mirrors.cloud.tencent.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.cloud.tencent.com/debian/ buster-backports main non-free contrib
- 兰州大学镜像站
deb http://mirror.lzu.edu.cn/debian stable main contrib non-free
deb http://mirror.lzu.edu.cn/debian stable-updates main contrib non-free
deb http://mirror.lzu.edu.cn/debian/ buster-backports main contrib non-free
deb http://mirror.lzu.edu.cn/debian-security/ buster/updates main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian stable main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian stable-updates main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian/ buster-backports main contrib non-free
deb-src http://mirror.lzu.edu.cn/debian-security/ buster/updates main contrib non-free
- 上海交大镜像站
deb https://mirror.sjtu.edu.cn/debian/ buster main contrib non-free
deb https://mirror.sjtu.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirror.sjtu.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirror.sjtu.edu.cn/debian-security/ buster/updates main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian/ buster-updates main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian/ buster-backports main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian/ buster main contrib non-free
deb-src https://mirror.sjtu.edu.cn/debian-security/ buster/updates main contrib non-free
- 163镜像站
deb http://mirrors.163.com/debian/ buster main non-free contrib
deb http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ buster/updates main non-free contrib
deb-src http://mirrors.163.com/debian/ buster main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.163.com/debian-security/ buster/updates main non-free contrib
- debian官方源 附上官方全球镜像站列表地址:https://www.debian.org/mirror/list
如果不想更改官方源,在后面追加即可。
更换pip源
输入以下命令,更新pip
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U
完成以后输入以下命令:
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
官方 [https://pypi.python.org/simple/v2ex http://pypi.v2ex.com/simple/](https://pypi.python.org/simple/v2ex http://pypi.v2ex.com/simple/)
国内源列表
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣 http://pypi.douban.com/simple/Python
中国科学院 http://pypi.mirrors.opencas.cn/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
code enjoy! 🐾🐾🐾🐾🐾🐾🐾🐾🐌🐝
作者:indeex
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。