ディストリビューションとは?
LinuxをPCにインストールする一般的な方法として、「ディストリビューション」をインストールすることが挙げられる。
ディストリビューションとは、Linuxをすぐに使えるために必要なアプリケーションなどをパッケージングしたもの。
そのため、ディストリビューションをインストールすれば、Linuxが使えるようになる。
ディストリビューションは「Red Hat Enterprise Linux (RHEL)」「Fedora」「Debian」「CentOS」「Ubuntu」などたくさんの種類がある。
今回は初心者でも使いやすい「Ubuntu」をPCにインストールする方法を解説。
仮想環境
UTMという仮想化ソフトウェアを使って、M1/M2のmacOSにUbuntu Desktopの仮想マシンを作成。
手順はこちら
https://envader.plus/article/66
※Virtual BoxはM1/M2チップのmacOSでは、VirtualBoxを使用することができない。
SHH接続
インストールしたUbuntuはUTMのバーチャルコンソールから操作することもできるのですが、使い慣れたMacのターミナルからSSHで接続することも可能。
まず、バーチャルマシンに割り当てられたIPアドレスを確認。
Ubuntuで次のコマンドを実行。
id address
この場合は、2: enp0s10:
の下の inet 192.168.xx.x
がお目当てのIPアドレス
macのterminalから接続
ssh {username}@192.168.xx.x
ryamashita@ryamashita ~ % ssh reiji@192.168.64.4
The authenticity of host '192.168.64.4 (192.168.64.4)' can't be established.
ED25519 key fingerprint is SHA256:srPb2LfPfw6Z4jeFDFcDMQehcjfFdouUmFcqkLdHf7w.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
これはyes
で。
ryamashita@ryamashita ~ % ssh reiji@192.168.64.4
The authenticity of host '192.168.64.4 (192.168.64.4)' can't be established.
ED25519 key fingerprint is SHA256:srPb2LfPfw6Z4jeFDFcDMQehcjfFdouUmFcqkLdHf7w.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.64.4' (ED25519) to the list of known hosts.
reiji@192.168.64.4's password:
Welcome to Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-100-generic aarch64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
System information as of Sun Mar 10 07:57:32 AM UTC 2024
System load: 0.0
Usage of /: 73.9% of 10.70GB
Memory usage: 19%
Swap usage: 0%
Processes: 211
Users logged in: 1
IPv4 address for enp0s1: 192.168.64.4
IPv6 address for enp0s1: fde0:ce63:ec3d:cbdd:5cd5:dcff:fe78:5be3
* Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
just raised the bar for easy, resilient and secure K8s cluster deployment.
https://ubuntu.com/engage/secure-kubernetes-at-the-edge
Expanded Security Maintenance for Applications is not enabled.
0 updates can be applied immediately.
Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status
Last login: Sat Mar 9 07:33:05 2024
reiji@utm-ubuntu:~$
接続できた!!!