見出し画像

jetson nanoのホスト名を変更する

SSHで接続する際に,ipを毎回調べるのは面倒ですので

ホスト名を設定しました.

一応,ホスト名は設定されていましたが,名前から用途が分からなかったので変更したので,その手順を記載しておきます.

結論から言うと

/etc/hosts/etc/hostnameの中身を変更すれば大丈夫です.

今回は「masaki-desktop」から「masaki-jetson」に変更します.

/etc/hosts

File Edit Options Buffers Tools Conf Help
127.0.0.1       localhost
127.0.1.1       masaki-jetson <--------変更箇所

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

/etc/hostname

masaki-jetson

編集後に再起動します.


▼無事に接続できました.

C:\Users\mtani>ssh masaki@masaki-jetson
The authenticity of host 'masaki-jetson (192.168.11.7)' can't be established.
ECDSA key fingerprint is SHA256:CRcsULbK3MU8y6/iV20NExxw/dt6vJtgfbIbnIPcIIE.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'masaki-jetson,192.168.11.7' (ECDSA) to the list of known hosts.
masaki@masaki-jetson's password:
Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.9.201-tegra aarch64)

* Documentation:  https://help.ubuntu.com
* Management:     https://landscape.canonical.com
* Support:        https://ubuntu.com/advantage
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, you can run the 'unminimize' command.

221 個のパッケージがアップデート可能です。
156 of these updates are security updates.
To see these additional updates run: apt list --upgradable

Last login: Fri Sep 24 04:15:58 2021 from fe80::7543:396e:d97d:f537%eth0
masaki@masaki-jetson:~$ sudo su


これで,jetson nanoを使った開発が快適に進みますね!







この記事が気に入ったらサポートをしてみませんか?