Contents
Ubuntu Server 26.04
インストールイメージのダウンロード
You can download the Ubuntu Server installation media from the official website. With a fast internet connection, it takes only about 2 to 3 minutes to download the OS itself.
You will need to create an installation CD/DVD or USB drive from the downloaded ISO file. (Approx. 2.7 GB)
The ISO file can be downloaded from https://releases.ubuntu.com/resolute/
The file to download is ubuntu-26.04-live-server-amd64.iso
Since Ubuntu 26.04 (released on April 23, 2026) will receive standard support until April 2031, it is safer to deploy the LTS version of Ubuntu 26.04 in a production environment.
Install
Configure the BIOS to boot from the installation disk you created above, then start up the PC.
The installation process is the same as for Ubuntu 24.04, so I will omit the details here. Please refer to the page below.
Initial settings
1. Set root password
In the default configuration of Ubuntu, the root user is unavailable because no password has been set.
By setting a password for the root user, transitions using the traditional [su] command will be possible.
|
1 2 3 4 5 |
$ sudo passwd root [sudo] password for [user name] ← Current user's password New password: ← Enter the password to be set Retype new password: ← again password passwd: password updated successfully |
Switch to root user
|
1 2 |
$ su - Password:[Password set above] |
2. System Modernization
|
1 2 |
# apt update # apt upgrade |
3. Make locate command available
The find command is often used to search for specific files throughout the Linux system, but find is somewhat confusing in terms of specifying options.
The locate command can extract all files with a specified filename.
1. Installing the locate package
|
1 2 3 4 |
# apt install -y locate Check the package # dpkg -l | grep locate ii locate 4.10.0-3build2 amd64 maintain and query an index of a directory tree |
3.2 Example of executing the locate command
|
1 2 3 4 5 6 7 |
# updatedb # locate sshd /etc/pam.d/sshd /etc/ssh/sshd_config /etc/ssh/sshd_config.d ・・・・ As shown above, a list of filenames containing "sshd" will be displayed |
4. vim editor settings
Ubuntu has vim installed by default
4.1 Changing Vim settings
There may be cases where you do not want to allow vim settings for all users. In such cases, a ".vimrc" file can be created in each user's home directory to change the vim environment for each user.
In this case, we will create a ".vimrc" file in the root user's home directory "/root/" and apply it to all users.
|
1 |
# vi ~/.vimrc |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
set clipboard+=autoselect " Use vim's own extensions (not compatible with vi) set nocompatible " Specify character code set encoding=utf-8 " Specify file encoding set fileencodings=utf-8,iso-2022-jp,sjis,euc-jp " Specify the line feed code to be automatically recognized set fileformats=unix,dos " Do not distinguish between upper and lower case letters when searching set ignorecase " Mixing capital letters in search terms makes the search case sensitive set smartcase " Highlight words matching the search term The reverse is [ set nohlsearch ]. set hlsearch " Use incremental search (start searching for matching strings at any time while entering search terms) set incsearch " Display line numbers set number " Highlight corresponding parentheses when entering parentheses set showmatch " No newlines at the end of files set binary noeol " Enable automatic indentation] set autoindent " Color-coded display by syntax syntax on " [ Change color of comment text in case of [ syntax on ]. highlight Comment ctermfg=LightCyan " Wrap lines by window width set wrap |
Select the above settings according to your preference.
5. ネットワークの設定
5.1 Host Name Settings
This procedure is not necessary if you have already set the hostname at the time of Ubuntu installation and wish to use the hostname as it is.
To change the hostname, use the "hostnamectl set-hostname" command.
As an example, we set "Lepard" as the hostname.
|
1 2 3 4 |
# hostnamectl set-hostname Lepard Confirmation of Settings Results # cat /etc/hostname Lepard |
5.2 Set IP address to network interface
If you specified a static IP address during Ubuntu installation, this section is unnecessary.
To change the IP address, modify the /etc/netplan/00-installer-config.yaml file, then restart the network interface (ens33 in this environment).
The network interface name varies depending on the setup environment, so first check the interface name.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Check Network Information # ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host noprefixroute valid_lft forever preferred_lft forever 2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 00:0c:29:4a:bb:5c brd ff:ff:ff:ff:ff:ff altname enp2s1 inet 192.168.11.83/24 brd 192.168.11.255 scope global ens33 valid_lft forever preferred_lft forever inet6 fe80::20c:29ff:fe4a:bb5c/64 scope link valid_lft forever preferred_lft forever |
ens33:Network Interface Name
192.168.11.83 : IP Address
Setting up a static IP address
This time, we'll set the IP address to 192.168.11.63 as an example. The required network information is as follows, and this will be reflected in the configuration file.
Address : 192.168.11.63/24
Default gateway : 192.168.11.1
Name server : 192.168.11.1
IP address settings are configured by modifying the "/etc/netplan/00-installer-config.yaml" file.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
Disable the installer's default settings and back them up. # mv /etc/netplan/00-installer-config.yaml /etc/netplan/00-installer-config.yaml.bak Create a new installer configuration file # vi /etc/netplan/01-installer-config.yaml # This is the network config written by 'subiquity' network: ethernets: ens33: addresses: - 192.168.11.63/24 match: macaddress: 00:0c:29:e4:a7:f1 nameservers: addresses: - 192.168.11.1 search: - korodes.com routes: - to: default via: 192.168.11.1 set-name: ens33 version: 2 # Apply settings # netplan apply |
5.3 Disabling IPv6
|
1 2 3 |
# echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf # sysctl -p net.ipv6.conf.all.disable_ipv6 = 1 |
6. Configure server time synchronization
The default service for automatically synchronizing the server's time has been changed from system-timesyncd to chrony.
6.1 Configuration of the chronyd service
Configure the time synchronization server in /etc/chrony/sources.d/ubuntu-ntp-pools.sources.
|
1 2 3 4 5 6 7 8 |
# vi /etc/chrony/sources.d/ubuntu-ntp-pools.sources Lines 4–7: Comment them out and add the text below them #pool 1.ntp.ubuntu.com iburst maxsources 1 nts prefer #pool 2.ntp.ubuntu.com iburst maxsources 1 nts prefer #pool 3.ntp.ubuntu.com iburst maxsources 1 nts prefer #pool 4.ntp.ubuntu.com iburst maxsources 1 nts prefer pool ntp.nict.jp iburst |
Restart chrony and enable it to remain active after a system reboot.
|
1 2 |
# systemctl enable chrony.service # systemctl restart chrony.service |
Open the NTP port in the firewall (We'll explain firewalls on the next page, so just open it for now).
|
1 2 3 4 |
# ufw enable # systemctl start ufw # ufw allow ntp # ufw reload |
6.2 Checking the status (operation) of chronyd
|
1 2 3 4 5 6 7 8 |
# chronyc sources MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^- ntp-nts-1.ps5.canonical.> 2 6 17 44 +262us[ +262us] +/- 131ms ^- ntp-a2.nict.go.jp 1 6 17 46 +767us[ +767us] +/- 6113us ^* ntp-a3.nict.go.jp 1 6 17 47 -365us[ -295us] +/- 6763us ^- ntp-b2.nict.go.jp 1 6 17 46 -279us[ -279us] +/- 7526us ^- ntp-b3.nict.go.jp 1 6 17 46 -207us[ -207us] +/- 6576us |
7. Set time zone to Japan
Current Time Zone Check
|
1 2 3 4 5 6 7 8 |
# timedatectl status Local time: Fri 2026-04-24 02:52:27 UTC Universal time: Fri 2026-04-24 02:52:27 UTC RTC time: Fri 2026-04-24 02:52:27 Time zone: Etc/UTC (UTC, +0000) System clock synchronized: yes NTP service: active RTC in local TZ: no |
In the above, Time zone: Etc/UTC (UTC, +0000), so it matches Japan (Asia/Tokyo).
|
1 2 3 4 5 6 7 8 9 |
# timedatectl set-timezone Asia/Tokyo # timedatectl status Local time: Fri 2026-04-24 11:53:12 JST Universal time: Fri 2026-04-24 02:53:12 UTC RTC time: Fri 2026-04-24 02:53:11 Time zone: Asia/Tokyo (JST, +0900) System clock synchronized: yes NTP service: active RTC in local TZ: no |
As above, it is in Japan.

