Enterprise SONiC Bootcamp Register Now

Sign Up

Ubuntu Cheat Sheet

Navigate and master Ubuntu with our essential commands cheat sheet, perfect for users of all levels.

Ubuntu Cheat Sheet Commands

The Ubuntu Commands Cheat Sheet provides a list of the most crucial Ubuntu commands that every user should be familiar with. These commands help you navigate the system, manage files and directories, install and update software, and perform many other tasks. Whether you’re new to Ubuntu or have been using it for a while, this cheat sheet will be a handy guide.

This comprehensive guide is designed to help you navigate the Ubuntu operating system with ease. Covering everything from basic file management to advanced networking tasks, our cheat sheet includes essential commands to boost your efficiency and productivity. Network engineers and system administrators rely on these commands for their daily tasks and critical operations. Dive in and start mastering Ubuntu today!

Canonical Ubuntu

System Information Commands

System Monitoring and Management

Displays all system information
Shows current hostname and related details
Lists CPU architecture information
Shows system time

Displays real-time system processes
An interactive process viewer (needs installation)
Shows disk usage in a human-readable format
Displays free and used memory in MB
Terminates a process

Running Commands

Directory Navigation

Runs command in the background
Displays background commands
Brings command to the foreground

Displays the current directory path
Changes the current directory
Creates a new directory

Service Management

Text Editing and Processing

Starts a service
Stops a service
Checks the status of a service
Reloads a service’s configuration
Follows the journal, showing new log messages in real time
Displays logs for a specific systemd unit.

Opens a file in the Nano text editor
Displays the contents of a file
Displays the paginated content of a file
Shows the first few lines of a file
Shows the last few lines of a file
Prints every line in a file

Cron jobs and scheduling

Archiving and Compression

Edits cron jobs for the current user
Lists cron jobs for the current user

Compresses files into a tar.gz archive
Extracts a compressed tar archive

File Management

Searching and Finding

Lists files and directories
Creates an empty file or updates the last accessed date
Copies files from source to destination
Moves files or renames them
Deletes a file

Compresses files into a tar.gz archive
Extracts a compressed tar archive

APT Package Management

SNAP Package Management

Installs a package
Searches for APT packages
Lists available package versions
Updates package lists
Upgrades all upgradable packages
Removes a package
Removes a package and all its configuration files

Search for Snap packages
Installs a Snap package
Removes a Snap package
Updates all installed Snap packages
Lists all installed Snap packages
Displays information about a Snap package

User Management

Group Management

Shows which users are logged in
Creates a new user
Deletes a user
Sets or changes the password for a user
Switches user
Locks a user account
Unlocks a user password
Sets user password expiration date

Displays user and group IDs
Shows the groups a user belongs to
Creates a new group
Deletes a group

Networking

Netplan configuration

Displays network interfaces and IP addresses
Shows network statistics
Shows listening sockets
Pings a host and outputs results

Displays the current Netplan configuration
Tests a new configuration for a set period of time
Applies the current Netplan configuration

Firewall management

SSH and remote access

Displays the status of the firewall
Enables the firewall
Disables the firewall
Allows traffic on a specific port or service
Denies traffic on a specific port or service
Deletes an existing rule

Connects to a remote host via SSH
Securely copies files between hosts

Ubuntu

What is Ubuntu?

Ubuntu is a popular, open-source operating system based on Linux, known for its ease of use and robust security features. It is widely used by developers globally due to its stability and versatility. Ubuntu provides a user-friendly interface and a vast repository of software applications, making it suitable for both beginners and experienced users. Regular updates and strong community support ensure that Ubuntu remains a reliable and cutting-edge choice for desktops, servers, and cloud environments. Whether for personal use or enterprise solutions, Ubuntu offers a powerful platform for a wide range of computing needs.

Useful Ubuntu Shortcuts

Here are some useful shortcuts for Ubuntu that can help network engineers and system administrators perform their tasks more efficiently. These shortcuts enable quick navigation and command execution in the terminal. By using them, you can streamline your workflow, save time, and focus on more critical tasks. From searching command history to managing multiple terminal tabs, these shortcuts cover essential functions, making everyday tasks faster and less cumbersome. Incorporating these into your routine will enhance your productivity and make your command-line experience smoother, especially when performing configuration, monitoring, and maintenance activities on Ubuntu systems.

  • Search Command History: Ctrl + R
  • Cancel Current Command: Ctrl + C
  • Clear Terminal Screen: Ctrl + L
  • Exit Terminal: Ctrl + D or type exit
  • Pause a Command: Ctrl + Z (resume with fg)
  • Open a New Terminal Tab: Ctrl + Shift + T
  • Switch Between Terminal Tabs: Ctrl + PgUp/PgDn
  • Autocomplete Commands or Filenames: Tab
  • Jump to Beginning of the Line: Ctrl + A
  • Jump to End of the Line: Ctrl + E
  • Delete Entire Line: Ctrl + U
  • Delete from Cursor to End of Line: Ctrl + K
  • Delete Word Before Cursor: Ctrl + W
  • Undo Last Command: Ctrl + _ or Ctrl + Shift + -

These shortcuts will help you navigate and manage your Ubuntu system more effectively, making your workflow smoother and more efficient.

GNS3 Knowledge Base

Discover a wealth of information and expert tips in our GNS3 Knowledge Base, your go-to resource for mastering network simulations. Whether you need detailed tutorials, expert tips, or troubleshooting advice, our Knowledge Base has everything to enhance your skills and solve any challenges. Dive in now to enhance your skills and troubleshoot any challenges with ease!

Share the Knowledge: Spread the Word About Our Ubuntu Cheat Sheet!

If you find this page helpful for your networking knowledge and skills, please consider sharing it with your friends, colleagues, and social media followers. Your support helps us create more valuable resources and enhance our courses.

You can share this page on your social media accounts like Facebook, LinkedIn, Twitter, and any related networking and programming forums or blogs. By sharing, you assist other networking enthusiasts in their learning journey, making their work easier and more efficient. So, if you’d like to help others, kindly share this page.

For more in-depth networking knowledge, visit our route2open courses.

SONiC Cheat Sheet!

Simply provide us with your name and email address, and we’ll send you our cheat sheet straight to your inbox