说明
在完成上一节 “JetsonNano —— 1、Windows下对Nano板卡烧录刷机(官方教程)” 后,对新系统进行一些基础配置,以便使用更得心应手么。
基础配置
1、通过SSH连接Nano
SSH是一种网络协议(默认的端口号为22),用于计算机之间的加密登陆,通过命令行形式来实现远程控制。Jetson Nano系统默认开启SSH服务,所以只要网络连接正常就可以直接使用SSH登陆。
2、更换国内镜像源
打开 /etc/apt/sources.list 文件,注释原内容,在末尾添加下述内容(注意镜像源需要支持arm64架构),以下镜像源大家可以任选。
清华大学镜像源:
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
中国科学技术大学镜像源:
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb http://mirrors.ustc.edu.cn/ubuntu-ports bionic main restricted universe multiverse
# deb-src http://mirrors.ustc.edu.cn/ubuntu-ports bionic main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports bionic-updates main restricted universe multiverse
# deb-src http://mirrors.ustc.edu.cn/ubuntu-ports bionic-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports bionic-backports main restricted universe multiverse
# deb-src http://mirrors.ustc.edu.cn/ubuntu-ports bionic-backports main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports bionic-security main restricted universe multiverse
# deb-src http://mirrors.ustc.edu.cn/ubuntu-ports bionic-security main restricted universe multiverse
阿里巴巴镜像源:
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.aliyun.com/ubuntu-ports/ bionic main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu-ports/ bionic main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu-ports/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu-ports/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu-ports/s bionic-backports main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu-ports/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu-ports/ bionic-security main restricted universe multiverse
源配置完成以后,使用下述两条命令更新:
sudo apt update
sudo apt upgrade -y
3、更新Python3
nano默认安装了python2,那么我们先将其删除:
sudo apt-get autoremove python
nano若默认安装了python3,那么直接升级:
pip3 install --upgrade pip附上:
删除python3:
sudo apt-get autoremove python3
安装python3:
sudo apt-get install python3
安装python3的pip3及其dev:
sudo apt-get install python3-pip python3-dev
4、安装jtop (查看NVENC硬件编解码)
// 安装jtop
sudo -H pip3 install -U jetson-stats// 运行jtop服务
sudo systemctl restart jetson_stats.service// 启动jtop
sudo jtop
5、安装rzsz,支持远程xshell下载上传文件
从虚拟机上下载文件到本地xshell中操作:输入"sz ./xxx.zip"然后选择存放到本地的路径即可。从本地上传文件到虚拟机系统中:输入"rz"然后选择本地的文件,点击确定后会自动上传到xshell终端所在当前的虚拟机系统目录。(可在xshell中用pwd查看具体存储在哪里)。/**********************************************************/
注意:在上传或下载文件时,xshell通常是对单一文件进行操作的。所以若文件较多尽量选择zip压缩,之后再上传或下载。这里附上linux下zip压缩与解压指令:压缩:zip -r xxx.zip yyy (xxx为最终压缩的名称、yyy为需要压缩的目录)解压:unzip xxx.zip
/**********************************************************/
附:scp指令上传下载
将本地文件复制到远程Linux服务器(上传):格式: scp [option] /xx/file user@server-ip:/yy/dir格式说明: scp 选项 本地文件 服务器用户名@服务器ip:服务器存放目录举例: scp ./xx.zip jxd@192.168.2.20:/home/yy/save
将远程Linux服务器文件复制到本地(下载):格式: scp [option] user@server-ip:/yy/file /xx/dir格式说明: scp 选项 服务器用户名@服务器ip:服务器文件 本地存放目录举例: scp root@192.168.2.21:/home/xx.zip ./
关注
笔者 - jxd