Tuesday, March 3, 2026

Ubuntu Linux - Basic Operational Procedures

Ubuntu Linux is a popular, open-source operating system based on Linux. It is designed to be easy to use, secure, and suitable for desktops, servers, and cloud environments. It is developed and maintained by Canonical Ltd.

In this blog post we will document basic Ubuntu Linux operational procedures.

OS Update Procedure 

# Check current version - linux way
cat /etc/os-release 
cat /etc/debian-version # because Ubuntu is based on Debian
 
# Check current version - Ubuntu way
lsb_release -a
 root@acs-ubuntu-01:/etc# lsb_release -a  
 No LSB modules are available.  
 Distributor ID:  Ubuntu  
 Description:     Ubuntu 24.04.4 LTS  
 Release:         24.04  
 Codename:        noble  
 root@acs-ubuntu-01:/etc#  
 
# Apply all updates based on the local list of available packages from configured repositories
# Ubuntu sources are in /etc/apt/sources.list.d/ubuntu.sources
apt update -y
 
# installs newer versions of already installed packages
apt upgrade -y

# Upgrades installed packages
# Installs new dependency packages if required
# Removes conflicting or obsolete packages if necessary
apt full-upgrade -y

# Reboot if needed
reboot

Typical procedure to add user

 
# Add user dpasek
adduser dpasek

# Add user to group sudo and dpasek (if group does not exist, it is created)
usermod -aG sudo dpasek

# Change password
passwd dpasek
 

Procedure to change hostname

 
# Check current hostname
hostnamectl status

# Change hostname
hostnamectl set-hostname ubuntu01.example.com
 

Procedure to change IP and DNS Settings

 
# Show the current IP settings
ip a

# Check network configuration
cat /etc/netplan/50-cloud-init.yaml
 
 root@acs-ubuntu-02:~# cat /etc/netplan/50-cloud-init.yaml  
 network:  
  version: 2  
  ethernets:  
   ens33:  
    addresses:  
    - "192.168.8.111/24"  
    nameservers:  
     addresses:  
     - 192.168.4.5  
     search:  
     - home.uw.cz  
    routes:  
    - to: "default"  
     via: "192.168.8.254"  
 root@acs-ubuntu-02:~#  

# Change network configuration
##########################
 
# Change Netplan file 
vi /etc/netplan/50-cloud-init.yaml
 
# Safe procedure to try and apply IP settings in netplan configuration file
# If you CHNAGE IP in SSH session, you have to relogin and find & kill netplan try process 
netplan try 
 
# What happens:
# Netplan applies the new network configuration
# You get 120 seconds to confirm
# If you lose connection or do not confirm → system automatically rolls back 

# Unsafe procedure to apply IP settings in netplan configuration file
netplan apply 
 

Procedure to set Time Servers 

On Ubuntu Server, time synchronization is typically handled by systemd-timesyncd (default) or sometimes chrony in server environments.

Here is the standard procedure using systemd-timesyncd.

Check current time status

timedatectl

 root@acs-ubuntu-02:~# timedatectl  
                Local time: Tue 2026-03-03 20:27:30 UTC  
            Universal time: Tue 2026-03-03 20:27:30 UTC  
                  RTC time: Tue 2026-03-03 20:27:30  
                 Time zone: Etc/UTC (UTC, +0000)  
 System clock synchronized: yes  
               NTP service: active  
           RTC in local TZ: no  
 root@acs-ubuntu-02:~#   

Edit the time server configuration 

vi nano /etc/systemd/timesyncd.conf 

Example configuration

[Time]
NTP=0.pool.ntp.org 1.pool.ntp.org
FallbackNTP=2.pool.ntp.org 3.pool.ntp.org 

Enable NTP (if disabled)

timedatectl set-ntp true 

Restart the time synchronization service

systemctl restart systemd-timesyncd
 

Check and Verify NTP time servers

# Check and Verify NTP time servers
timedatectl

# More detailed information
timedatectl timesync-status
 

Installation of basic tools for Unix administration 

When Ubuntu Server is installed as minimal, there are not even basic tools for Unix administration. Let's install basic ones to be able to do effective administration.

  • vi, vim
  • ping 
# Installation of essential packages
apt install vim iputils-ping -y  
 

Conclusion

Hope these Ubuntu basic operational procedures helps someone.

No comments:

Post a Comment

Ubuntu Linux - Basic Operational Procedures

Ubuntu Linux is a popular, open-source operating system based on Linux. It is designed to be easy to use, secure, and suitable for deskt...