说明
在完成上一节 “JetsonNano —— 1、Windows下对Nano板卡烧录刷机(官方教程)” 后,对新系统进行一些基础配置,以便使用更得心应手么。
基础配置
1、通过SSH连接Nano
SSH是一种网络协议(默认的端口号为22),用于计算机之间的加密登陆,通过命令行形式来实现远程控制。Jetson Nano系统默认开启SSH服务,所以只要网络连接正常就可以直接使用SSH登陆。
2、更换国内镜像源
打开 /etc/apt/sources.list 文件,注释原内容,在末尾添加下述内容(注意镜像源需要支持arm64架构),以下镜像源大家可以任选。
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe
源配置完成以后,使用下述两条命令更新:
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下载上传文件
安装rzsz:
ubuntu系统输入:
sudo apt-get install lrzsz
centos系统输入:
yum -y install lrzsz
从虚拟机上下载文件到本地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