Linux Ubuntu Commands Cheat Sheet by Linuxsimply
Linux Ubuntu Commands Cheat Sheet by Linuxsimply
Ubuntu Commands
System Information Shell Built-in Commands
Sets environment variables that are used by
Displays the amount of free and used export processes started by the shell that exported the
free memory in the system
variable
Displays text on the screen or redirects it to a
ps Displays a snapshot of the current processes echo
file or variable
Displays detailed information about all Creates a shortcut or alternate name for a
ps aux alias command
processes currently running
Removes an alias previously created with the
uptime Displays the current uptime of the system unalias
"alias" command.
w Displays the list of currently logged-in users
Reports the file name of the Displays the total amount of free and used
tt terminal device that is currently free memory in the system, as well as the buffers
y used to interact with the shell and cached memory used by the kernel
sudo -H
Opens the file browser with root privileges File Management and Manipulation
nautilus
sudoRestarts the GDM (GNOME Display Manager)
/etc/init.d/gservice ls Lists files in a directory
dm restart
sudo Lists files in a directory and all of its
Restarts the KDM (KDE Display Manager) ls -R subdirectories
Lists all files in a directory, including hidden
/etc/init.d/k ls -al
service files, with detailed information
dm restart
Allows users to change their password
shutdown Shuts down the system in a safe way
ls -aLists all files in a directory, including hidden files
Modifies timestamps of a file or creates an
touch empty file if it doesn't exist
reboot Forces
Rebootsallthe
filesystem
system changes to be written to
disk
Compares two files line by line and shows the
differences between them
setstatus
Installs
Displaysone
theor moreofpackages
status on asecurity
the SELinux
system using a package manager
Linux Compression
zip and Archiving
Archives files and directories into a compressed
zip archive format
system
Controls system services, such as starting,
Extract the contents of a zip archive file
stopping, and restarting them
Compresses files using the Burrows-Wheeler
Retrieves entries from databases block sorting text compression algorithm and Huffman
Displays the current environment variables or Compresses files using the Lempel-Ziv
sets a new environment variable algorithm and Huffman coding
Displays a list of jobs running in the Decompresses files that have been compressed
jobs background of a shell gunzip using gzip
Permission Management tar Creates and manipulates archive files
Changes the permissions of file and
determines who can read, write, or execute a file Package Management
Changes the owner and/or group of a file or apt-get
chown directory Updates the list of available packages
update
File and Directory Management apt-get
upgrade
Upgrades all installed packages to their latest
version
apt-get dist- Upgrades all installed packages to their latest
mkdir Creates a new directory
upgrade version
apt-get
pwd Prints the current working directory Installs a package
install pkg
Changes the current working directory to a apt-get Completely removes a package, including its
cd purge pkg configuration files
specified directory
Modifies the password expiry information for date Displays the current date and time
chage a user
Opens up a more advanced version of the vi
Deletes a user account and all associated files vim editor with additional features such as syntax
userdel and directories
highlighting and plugins
addgroup Creates a new user group Splits a text file into smaller files based on the
split number of lines or bytes
groupadd Creates a new user group A stream editor that performs editing
sed operations on a text stream or file
Modifies the properties of an existing user Translates or deletes characters in a text stream
groupmod group tr or file
ifconfig Shows network interface configuration Displays the first ten lines of a file on the
head terminal
Shows wireless network interface tail Displays the last ten lines of a file
iwconfig configuration
Prepared By: Lamisa Musharrat Copyright ©2023 linuxsimply.com| All rights reserved.
Linux Cheat Sheet
Ubuntu Commands
sudo iwlist Searches for a specific pattern or text in a file or
Scans for available wireless networks grep output
scan
sudo
systemctl Displays the contents of a file one page at a
restart Restarts the networking service time, allowing scrolling back and forth
networking.s
ervice
Display the contents of a text file one screen at
ifup interface Brings up a network interface a time allowing user to scroll up and down
more
through the file, search for specific text, and
navigate to specific lines
ifdown
interface
Brings down a network interface
Miscellaneous
Allows users to configure and manage the Lists information about all available or specified
firewall -cmd
firewall settings block devices and can also display the
ufw enable Enables the firewall lsblk
relationship between the different devices,
ufw disable Disables the firewall such as partitions and logical volumes
ufw default
Sets the default policy to allow traffic Enables or disables a service at startup or a
allow enable specific hardware device or driver
ufw default Command-line calculator that allows for
Sets the default policy to deny traffic floating-point arithmetic and advanced mathematical fun
deny
Automates tasks to run at specified times or
ufw status Shows the status of the firewall cron
intervals
ufw allow Schedules periodic commands or scripts to run
Opens a port
port at specified intervals
ufw deny
Closes a port ncal Displays a calendar for a given month or year
port
ufw deny Displays system information and an ASCII art
Blocks traffic from a specific IP address
from ip logo of the operating system
Displays a directory tree structure in a
tree
hierarchical format
CTRL+
Closes Dthe current terminal
Up/Down Arrow keys Allows to quickly execute previous commands multiple times
TAB Completes the typing command
CTRL+XX Switches between the current cursor position and the start
line
CTRL+]+A