Linux Devops Commands Cheat Sheet by Linuxsimply
Linux Devops Commands Cheat Sheet by Linuxsimply
For DevOps
File and Disk Management User and Group Management
sudo useradd Creates a new user account with the
ls Lists files and directories in current directory
<username> specified username
history
Displays the list of previously executed
commands System Information
Displays the amount of free and used memory
in the system Displays the operating system name
uname -m Displays the machine hardware name
Prepared By: Lamisa Musharrat Copyright ©2023 linuxsimply.com| All rights reserved.
Linux Cheat Sheet
For DevOps
Package Management uname -r Displays the kernel release number
Handles packages on Ubuntu-based systems
lscpu Displays information about the CPU
sudo apt-get
remove
Removes a package from the system Text Searching
Performs a case-insensitive search
Network Configuration & Monitoring
Displays network interface configuration Displays the line numbers of the
ifconfig information, such as IP address, netmask, and grep -n
matched pattern
broadcast address
Displays all interface available even if those Inverts the search and displays all lines
ifconfig -a are down grep -v that do not match the pattern
Shows a count of the number of lines
ifconfig -s Displays short list of network interface grep -c that match the pattern
Displays and manages routing, devices, and
ip tunnels System Monitoring
Displays all IP addresses related with all Lists all files opened by any process of a
ip address network devices
system
Shows all network interfaces available on the
ip link system lsof -u username Lists all files opened by a user
Queries the DNS server for information about
nslookup a domain name or IP address Miscellaneous
route Access the Linux kernel's routing tables
Sets up, maintains, and inspects the tables of docker ps Lists all active Docker containers
iptables docker images Lists all Docker images on user’s
IPv4/IPv6 packet filter rules in the Linux kernel
machine
firewall
Displays network connections and network
Builds a Docker image from a
netstat statistics, such as active sockets, routing docker build
Dockerfile
tables, and network interface statistics
Creates a pair of public and private docker run Runs a Docker container
ss-keygen authentication keys
Client-server protocol used to establish a docker stop Stops an active Docker container
telnet connection to a remote computer
Scans hosts and services on a network, and
nmap provides information about operating systems, docker- compose up
Starts containers defined in a docker- compose.y
open ports, and services running on the hosts
Facilitates the transfer of data to or from a
server, using any of the protocols it supports, docker- Stops and removes containers defined in
curl
such as HTTP, HTTPS, FTP, FTPS, SCP, SFTP, compose down a docker-compose.yml file
TFTP, DICT, TELNET, LDAP, or FILE
Retrieves entries from databases, such as the use
git rm Removes files from the repository and stages the deletion
git merge Combines specified branch’s history into the current one