Creating Installation Media (USB) and Installing
For Mac users:
Download Ubuntu from https://jp.ubuntu.com/download ⧉.
Write the downloaded ISO file to a USB drive.
sudo dd if=~/Downloads/ubuntu-24.04-desktop-amd64.iso of=/dev/disk4 status=progressCheck the target disk (e.g., of=/dev/disk4) using diskutil list.
Then install Ubuntu using the created USB drive.
https://higmasan.com/ubuntu/ubuntu24-04/install-ubuntu-24-04-lts/#toc5 ⧉
Changing Home Directory Folder Names to English
Having folders like “ダウンロード” or “デスクトップ” in Japanese can be inconvenient. Revert them to English.
LC_ALL=C xdg-user-dirs-update --forceUse the following command to check current settings.
cat .config/user-dirs.dirsDelete the Japanese-named folders.
rm -rf デスクトップ ダウンロード テンプレート 公開 ドキュメント ミュージック ピクチャ ビデオIf you’re using a GUI, after reboot and login, a window may pop up asking, “Do you want to update the standard folders to match the current language?”. Check “Don’t show this again” and select “Keep old names”.
https://zenn.dev/tasiten/articles/7727537e2e975e ⧉
Switching Between Japanese and English Input
To switch between Japanese and English using Ctrl+Space:
Go to “Settings” → “Keyboard”, and add input sources for Japanese (Mozc) and English (US).
Scroll down to “Keyboard Shortcuts” → “View and Customize Shortcuts” → under “Typing”, set “Switch to Next Input Source” to Ctrl+Space.
https://qiita.com/Ryo99_1001/items/e505674d4eee7d5a60b9 ⧉
Installing SSH
SSH is essential.
sudo apt install openssh-serverIt should start automatically after installation. If not, enable it manually.
sudo systemctl start sshsudo systemctl enable sshEdit /etc/ssh/sshd.conf as needed.
PermitRootLogin noPubkeyAuthentication yesPermitEmptyPasswords noPasswordAuthentication yessudo systemctl restart sshdhttps://higmasan.com/ubuntu/ubuntu24-04/enabling-ssh-connections-to-ubuntu-24-04/ ⧉
sInstalling Samba
Using scp works, but mounting with Samba is more convenient.
sudo apt install sambaConfig File
Add the following to /etc/samba/smb.conf:
[global] unix extensions = no wide links = yes
[<mount name>] path = /home/<user name> browsable = yes read only = no guest ok = no valid users = <user name> force user = <user name>Replace <user name> with your actual username, and <mount name> with any display name you like.
Set smbpasswd
Add an SMB password for your user.
# sudo smbpasswd -a <user name>Mounting HDD
Easier to do it via GUI.
Go to “Utilities” → “Disks”.
apt-clone
If you’re managing multiple (compute) servers, using apt-clone makes replicating environments easier.
On the source server
sudo apt update & upgradesudo apt install apt-clonesudo apt-clone clone ~/hogeTransfer the generated hoge.apt-clone.tar.gz to the destination server using scp.
On the destination server
sudo apt update & upgradesudo apt install apt-clonesudo apt-clone restore ~/hoge.apt-clone.tar.gz