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
free export processes started by the shell that exported the
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
processes currently running command
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 exit Closes the current shell or terminal session
uname Displays system information clear Clears the terminal screen
Enables users to interact with Linux Operating
uname -a Displays detailed system information bash
System
Declares variables and specifies their attributes,
hostname Displays the name of the current host declare
such as their data type or scope
Executes a script in the current shell
Provides access to the documentation of
info source environment rather than creating a new
various installed software packages
subshell to run the script
lshw Lists hardware configuration of the system System Monitoring
Displays a list of previously executed Displays information about the active processes
history top
commands running on the system
Displays information about built-in shell Shows a list of all the running processes
help htop
commands throughout the system
Shows detailed information about system
Displays the manual page for a specified
man vmstat performance, including memory usage, CPU
command
utilization, and Input/Output (I/O) statistics
Reports the file name of the terminal Displays the total amount of free and used
tty device that is currently used to interact free memory in the system, as well as the buffers
with the shell and cached memory used by the kernel
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
scan output
sudo
systemctl
Displays the contents of a file one page at a
restart Restarts the networking service less
time, allowing scrolling back and forth
networking.s
ervice
Display the contents of a text file one screen at
a time allowing user to scroll up and down
ifup interface Brings up a network interface 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
lsblk
ufw enable Enables the firewall relationship between the different devices,
ufw disable Disables the firewall such as partitions and logical volumes
ufw default Enables or disables a service at startup or a
Sets the default policy to allow traffic enable
allow specific hardware device or driver
Command-line calculator that allows for
ufw default
Sets the default policy to deny traffic bc floating-point arithmetic and advanced
deny
mathematical functions
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 crontab
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 neofetch
from ip logo of the operating system
Displays a directory tree structure in a
tree
hierarchical format
Ubuntu Terminal Shortcuts
CTRL+ALT+T Opens terminal in Ubuntu
CTRL+A Places the cursor at the start of the active line
CTRL+E Places the cursor at the end of the active line.
CTRL+U Removes the entire active line
CTRL+K Removes the command from the cursor to the right
CTRL+W Removes the word preceding the cursor
Performs a history search for commands that match the
CTRL+R
user's input
CTRL+C Stop the active process
CTRL+ D Closes the current terminal
Sends the signal SIGSTOP to temporarily halt the active
CTRL+Z
process
Prepared By: Lamisa Musharrat Copyright ©2023 linuxsimply.com| All rights reserved.
Linux Cheat Sheet
Ubuntu Commands
Ubuntu Terminal Shortcuts
CTRL+L Clears terminal display
Up/Down Arrow keys Allows to quickly execute previous commands multiple times
Prepared By: Lamisa Musharrat Copyright ©2023 linuxsimply.com| All rights reserved.