What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To administer Ubuntu Linux, use sudo for temporary privilege elevation, APT for package maintenance, systemd for services, and the networking tools appropriate to your installation. This guide focuses on recurring tasks on a currently supported Ubuntu Server LTS installation; Ubuntu’s official Server documentation targets the latest LTS and notes that some instructions vary on older releases. Ubuntu Desktop uses different networking management. Check your release with lsb_release -a before changing a system, and consult the instructions for that release when a command or configuration differs.

This is a foundation for day-to-day administration, not a guide to every server role. Databases, directory services, containers, virtualization, high availability, and advanced observability each require their own procedures.

How do I add a user and give them sudo access on Ubuntu?

Use a normal account for everyday work and elevate only the commands that require administration. Ubuntu disables direct administrative root login by default; an authorized user runs sudo with their own password. Local users and groups are commonly managed with adduser. Accounts provided through LDAP, Active Directory, Samba, or another identity source need that system’s own account-management procedure.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Create a local user and grant administrative access

  1. Create the account: sudo adduser sam. Replace sam with the intended username and follow the prompts to set a password and optional user details.

  2. Add the account to Ubuntu’s administrative group: sudo usermod -aG sudo sam. The -aG options append the group rather than replacing the user’s existing supplementary groups.

  3. Have the user start a new login session, then verify membership with groups. Test authorization with sudo -v; it should prompt for that user’s password if needed and return without an error.

Do not edit /etc/passwd or related identity files by hand as a routine way to create accounts. Grant sudo only to people who need administrative authority, and remove access when it is no longer required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do I update Ubuntu from the terminal?

Package maintenance and an Ubuntu release upgrade are separate operations. Refreshing package lists checks which package versions are available; upgrading packages installs updates for the current release. Moving to a new Ubuntu release is a distinct process and should be planned for the machine’s workload and target release.

Refresh package information and install available updates

  1. Check which release you are administering with lsb_release -a.

  2. Refresh the local package index: sudo apt update.

  3. Review and install available package updates: sudo apt upgrade. Read APT’s proposed changes before confirming, especially on a production system.

  4. Restart services or the machine if an update requires it, following the relevant package or service guidance. Schedule production updates for a suitable maintenance window and test them where practical.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To install or remove a package, use sudo apt install package-name or sudo apt remove package-name. Substitute the actual package name. APT may show dependent packages or other changes for review before proceeding.

Understand automatic updates and release upgrades

Ubuntu’s documentation describes unattended-upgrades as installed by default, with security updates enabled and daily runs in the documented default setup. That is not a guarantee that every machine has identical configuration or behavior. Review the system’s settings in /etc/apt/apt.conf.d/20auto-upgrades and /etc/apt/apt.conf.d/50unattended-upgrades, and check logs under /var/log/unattended-upgrades/ when investigating its activity. Configuration and behavior can vary by release.

For a release upgrade, first check the release-specific Ubuntu instructions and confirm compatibility of applications, repositories, and operational plans. Do not treat apt upgrade as a release upgrade or schedule release changes as if they were routine package updates.

Rank #2
Ubuntu Linux Humanity to Others T-Shirt
  • Ubuntu Linux Philosophy design. Logo with text slogan over a faded digital background.
  • Linux inspiring design. A great gift for Linux lovers, geeks, programmers, hackers, tech lovers, etc.
  • Lightweight, Classic fit, Double-needle sleeve and bottom hem

How do I check and restart a service in Ubuntu?

Ubuntu commonly uses systemd to manage services. Substitute the actual unit name for service-name; package documentation is the best place to confirm it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • systemctl status service-name shows whether the service is active and recent status information.
  • sudo systemctl restart service-name restarts a running service after a change or to recover from a fault.
  • sudo systemctl start service-name starts a stopped service.
  • sudo systemctl stop service-name stops a service.
  • sudo systemctl enable service-name configures a service to start at boot; it does not necessarily start it immediately.
  • sudo systemctl disable service-name removes that boot-start setting; it does not necessarily stop a currently running service.

Before restarting a production service, consider who depends on it and whether the restart interrupts active work. If it fails, inspect the status output and logs with sudo journalctl -u service-name. Add --since "1 hour ago" to narrow the log window.

Change service configuration safely

Use the configuration method documented for the specific package. Package-managed files can be changed by package updates, so direct edits may be overwritten or prompt a decision during an upgrade. For systemd unit customization, a drop-in override is often preferable to editing the vendor unit:

  1. Open the override editor: sudo systemctl edit service-name.

  2. Add only the supported settings for that service. The appropriate directives depend on the application and its unit.

    Free tools Windows power users keep installed

    One-click scans. No signup required.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  3. Save the override and apply it with sudo systemctl daemon-reload, then restart the service if the change requires it.

  4. Verify the result with systemctl status service-name and, if needed, sudo journalctl -u service-name.

How do I configure networking on Ubuntu Server?

First identify whether you are administering Ubuntu Server or Desktop and which tool owns the network configuration. Ubuntu Server uses Netplan as a high-level YAML configuration abstraction; the renderer and setup beneath it matter. Ubuntu Desktop networking is driven by NetworkManager, so Server Netplan instructions should not be applied blindly to Desktop.

Inspect interfaces, routes, and DNS

  • ip -br address lists interfaces and their addresses in a compact format.
  • ip route shows the routing table, including the default route when configured.
  • resolvectl status displays DNS configuration and resolver status on systems using systemd-resolved.

For time synchronization on the Server setup described in Ubuntu’s networking documentation, Chrony is the default service; timedatectl and timesyncd are alternatives. Check the release-specific guidance before changing time services.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make a Server network change without losing access

Netplan configuration is typically stored in YAML files under /etc/netplan/. Read the existing files and establish which renderer and network settings are in use before editing. A mistake to an address, route, or remote-access interface can disconnect your session.

  1. Back up the relevant configuration file and ensure you have a practical recovery route, such as local console access or a provider’s recovery console.

  2. Edit the applicable Netplan YAML file using the settings required for your network. The correct interface name, renderer, address, gateway, and DNS values depend on the machine and network; do not copy a generic static-address example without adapting it.

  3. Where supported by the installed Netplan version, use sudo netplan try to test the configuration with a timed confirmation. If the connection is lost or the change is wrong, do not confirm it; use the available console or recovery access.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  4. After applying or confirming a change, verify the address, route, and DNS again with ip -br address, ip route, and resolvectl status, then test the required connectivity.

On Ubuntu Desktop, use NetworkManager’s controls for its connection rather than assuming the Server configuration path applies. Desktop networking has a different hook mechanism.

How should I secure an Ubuntu system?

Security is a set of layers, not a universal command sequence. Keep software current, limit privileged access, expose only required services, secure remote administration, and understand the protections already in place.

  • Limit privilege: use individual accounts and grant sudo only where required. Avoid sharing administrative credentials.
  • Maintain packages: choose a package-update process appropriate to the system’s release and availability requirements, and monitor whether updates are being applied.
  • Use a firewall that matches the workload: allow only intended services and account for where the machine is exposed. A safe rule set for one server may block a required service on another.
  • Secure remote access: use SSH for secure remote administration and review the relevant Ubuntu SSH guidance for authentication and access controls appropriate to your environment.
  • Keep AppArmor in view: Ubuntu uses AppArmor to limit software access. Investigate its status and related logs when an application encounters an access problem rather than disabling protections without understanding the cause.

Firewall rules, advanced authentication, certificate management, VPNs, and centrally managed accounts depend on the services and environment involved. Use dedicated, release-appropriate instructions for those configurations instead of applying a blanket hardening recipe.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How do I back up an Ubuntu server?

A backup plan specifies what data is protected, how often copies are made, where they are stored, and how restoration will work. Important backup media should have an off-site copy. A removable hard drive is one possible physical destination, but a local drive alone does not provide off-site protection.

Choose an approach that fits the system

Ubuntu’s backup guidance names Bacula for multi-system network backups and rsnapshot for periodic local or remote snapshots over SSH on a single system. They are examples, not universal recommendations. Compare options against the number of systems, automation needs, encryption, incremental behavior, operating complexity, storage location, and restore procedure. Custom scripts can be appropriate for a narrow task, but they still need monitoring and a tested recovery plan.

Plan and test restoration

  1. List the data and configuration needed to restore the service, including any dependencies or application-specific state.

    Rank #4
    Ubuntu Linux - Secure, Reliable Operating System for Coders T-Shirt
    • Ubuntu Linux is an open-source operating system based on the Debian Linux distribution. Ubuntu is designed to be easy to use and offers a complete desktop experience for users, including office applications, multimedia tools, internet browsers, and more
    • Ubuntu Linux is a reliable, user-friendly, and secure operating system with a vast software repository, making it a popular choice for personal and professional use. Long-term support and security features of Ubuntu make it a popular choice for businesses
    • Lightweight, Classic fit, Double-needle sleeve and bottom hem
  2. Set a backup frequency that reflects how much recent data the service can afford to lose, and decide how long copies should be retained.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  3. Store copies in a location that remains useful if the server itself or its site is unavailable. Keep important media off-site.

  4. Perform a restore test in a safe environment and verify that the restored data can actually be used by the service. A completed backup job alone does not establish that recovery will succeed.

Ubuntu’s backup documentation, last updated 2026-01-20, discusses planning, off-site storage, and restoration. The suitable tool and schedule depend on the system being protected.

Where should I start when troubleshooting Ubuntu?

Start with the symptom and the component involved, then gather evidence before changing configuration. This keeps recovery work focused and helps distinguish an application problem from a package, service, network, or permission problem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Record the release and recent changes: lsb_release -a and, where relevant, the package or configuration change that preceded the failure.

  2. For a service problem, run systemctl status service-name and inspect its recent logs with sudo journalctl -u service-name --since "1 hour ago".

  3. For an update problem, review the APT output and package-update logs; for unattended updates, inspect /var/log/unattended-upgrades/.

  4. For a connectivity problem, inspect addresses, routes, and DNS using ip -br address, ip route, and resolvectl status. On a remote system, preserve a recovery path before modifying network settings.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  5. For an access problem, check the account’s group membership and the exact command’s sudo or AppArmor-related error before changing permissions or disabling controls.

Make one controlled change at a time, verify the result, and keep a way to reverse configuration changes. Application-specific failures may require the package’s own documentation or logs beyond these general system checks.

Quick Recap

SaleBestseller No. 1
Bestseller No. 2
Ubuntu Linux Humanity to Others T-Shirt
Ubuntu Linux Humanity to Others T-Shirt
Ubuntu Linux Philosophy design. Logo with text slogan over a faded digital background.; Lightweight, Classic fit, Double-needle sleeve and bottom hem
$15.99
SaleBestseller No. 3
Bestseller No. 4
Ubuntu Linux - Secure, Reliable Operating System for Coders T-Shirt
Ubuntu Linux - Secure, Reliable Operating System for Coders T-Shirt
Lightweight, Classic fit, Double-needle sleeve and bottom hem
$19.95

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.