[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-571398-105":3,"detail-sidebar-cat-1-en-105":81,"doc-detail-571398-en":127},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","ubuntu-cli-cheat-sheet-quick-reference","Ubuntu CLI Cheat Sheet - Quick Reference","","Ubuntu CLI cheat sheet for day-to-day administration and troubleshooting. It consolidates core commands for system information, monitoring, disk and memory checks, and process control. Coverage includes job control in the shell, systemd service lifecycle and log viewing, cron scheduling, file and directory management, permissions and ownership changes, search utilities, and tar-based archiving and compression. It also summarizes package management with APT and Snap, user and group operations, networking commands, firewall rules via UFW, SSH and remote file copy, and basic LXD container or VM management.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/template/","Template",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/template/presentations/","Presentations",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/template/ubuntu-cli-cheat-sheet-quick-reference/571398/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/ubuntu-cli-cheat-sheet-quick-reference/571398.png","ImageObject",442,249,{"name":42,"@type":43},"Ezra","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-21","2026-10-13",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",8,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"How can I check system details like kernel and machine info on Ubuntu?","Question",{"text":63,"@type":64},"Use uname -a for system information, hostnamectl for hostname details, and lscpu for CPU architecture information. timedatectl status shows current system time.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"What commands help me monitor processes and system resources in real time?",{"text":68,"@type":64},"Use top or htop for real-time process viewing, df -h for disk usage, and free -m for memory availability. The kill \u003Cprocess id> command terminates a process.",{"name":70,"@type":61,"acceptedAnswer":71},"How do I manage services and view logs with systemd?",{"text":72,"@type":64},"Start, stop, check status, and reload services with systemctl commands (start/stop/status/reload). Use journalctl -f for live log output, or journalctl -u \u003Cunit_name> for logs from a specific systemd unit.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},571398,1792015520,{"code":4,"msg":82,"data":83},"success",[84,88,93,98,103,108,113,118,123],{"id":85,"doc_module":22,"doc_module_name":25,"category_name":29,"show_sort_weight":86,"slug":87},11,90,"presentations",{"id":89,"doc_module":22,"doc_module_name":25,"category_name":90,"show_sort_weight":91,"slug":92},12,"Resumes",80,"resumes",{"id":94,"doc_module":22,"doc_module_name":25,"category_name":95,"show_sort_weight":96,"slug":97},14,"Invoices",70,"invoices",{"id":99,"doc_module":22,"doc_module_name":25,"category_name":100,"show_sort_weight":101,"slug":102},15,"Posters",60,"posters",{"id":104,"doc_module":22,"doc_module_name":25,"category_name":105,"show_sort_weight":106,"slug":107},16,"Social Media",50,"social-media",{"id":109,"doc_module":22,"doc_module_name":25,"category_name":110,"show_sort_weight":111,"slug":112},17,"Forms",40,"forms",{"id":114,"doc_module":22,"doc_module_name":25,"category_name":115,"show_sort_weight":116,"slug":117},18,"Letters",30,"letters",{"id":119,"doc_module":22,"doc_module_name":25,"category_name":120,"show_sort_weight":121,"slug":122},21,"Paper Templates",5,"papers-templates",{"id":124,"doc_module":22,"doc_module_name":25,"category_name":125,"show_sort_weight":4,"slug":126},158,"General","general-158",{"code":4,"msg":82,"data":128},{"doc_id":79,"user_id":129,"nickname":42,"user_avatar":130,"doc_module":22,"category_id":85,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":131,"file_id":132,"file_url":133,"file_type":134,"file_size":135,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":30,"language":136,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":137,"faqs":138,"seo_title":139,"seo_description":12,"update_tm":140,"read_time":22},1099514068035,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","Ubuntu CLI cheat sheet  \nSystem  \n\n| System information\u003Cbr>uname -a Displays all system information.\u003Cbr>hostnamectl Shows current hostname and related details.\u003Cbr>lscpu Lists CPU architecture information.\u003Cbr>timedatectl status Shows system time. |\n| --- |\n| System monitoring and management\u003Cbr>top Displays real-time system processes.\u003Cbr>htop An interactive process viewer (needs installation) .\u003Cbr>df -h Shows disk usage in a human-readable format.\u003Cbr>free -m Displays free and used memory in MB.\u003Cbr>kill \u003Cprocess id> Terminates a process. |\n| Running commands\u003Cbr>\u003Ccommand> & Runs command in the background.\u003Cbr>jobs Displays background commands.\u003Cbr>fg \u003Ccommand number> Brings command to the foreground. |\n| Service management\u003Cbr>sudo systemctl start \u003Cservice> Starts a service.\u003Cbr>sudo systemctl stop \u003Cservice> Stops a service.\u003Cbr>sudo systemctl status \u003Cservice> Checks the status of a service.\u003Cbr>sudo systemctl reload \u003Cservice> Reloads a service’s configuration without interrupting its operation.\u003Cbr>journalctl -f Follows the journal, showing new log messages in real time. journalctl -u \u003Cunit_name> Displays logs for a specific systemd unit. |\n\nCron jobs and scheduling  \ncrontab -e Edits cron jobs for the current user.  \ncrontab -l Lists cron jobs for the current user.  \nFiles  \n\n| File management\u003Cbr>ls Lists files and directories.\u003Cbr>touch \u003Cfilename> Creates an empty file or updates the last accessed date. cp \u003Csource> \u003Cdestination> Copies files from source to destination. mv \u003Csource> \u003Cdestination> Moves files or renames them. rm \u003Cfilename> Deletes a file. |\n| --- |\n| Directory navigation\u003Cbr>pwd Displays the current directory path.\u003Cbr>cd \u003Cdirectory> Changes the current directory.\u003Cbr>mkdir \u003Cdirname> Creates a new directory. |\n| File permissions and ownership\u003Cbr>chmod [who][+/-][permissions] \u003Cfile> Changes file permissions. chmod u+x \u003Cfile> Makes a file executable by its owner.\u003Cbr>chown [user]:[group] \u003Cfile> Changes file owner and group. |\n| Searching and finding\u003Cbr>find [directory] -name \u003Csearch_pattern> Finds files and directories. grep \u003Csearch_pattern> \u003Cfile> Searches for a pattern in files. |\n| Archiving and compression\u003Cbr>tar -czvf \u003Cname.tar.gz> [files] Compresses files into a tar.gz archive.\u003Cbr>tar -xvf \u003Cname.tar.[gz|bz|xz]> [destination] Extracts a compressed tar archive. |\n\nText editing and processing  \nnano \u003Cfile> Opens a file in the Nano text editor. cat \u003Cfile> Displays the contents of a file.  \nless \u003Cfile> Displays the paginated content of a file. head \u003Cfile> Shows the first few lines of a file.  \ntail \u003Cfile> Shows the last few lines of a file. awk '{print}' \u003Cfile> Prints every line in a file.  \nPackages  \nPackage management (APT)  \nsudo apt install \u003Cpackage> Installs a package.  \nsudo apt install -f --reinstall \u003Cpackage> Reinstalls a broken package. apt search \u003Cpackage> Searches for APT packages.  \napt-cache policy \u003Cpackage> Lists available package versions.  \nsudo apt update Updates package lists.  \nsudo apt upgrade Upgrades all upgradable packages.  \nsudo apt remove \u003Cpackage> Removes a package.  \nsudo apt purge \u003Cpackage> Removes a package and all its configuration files.  \nPackage management (Snap)  \nsnap find \u003Cpackage> Search for Snap packages.  \nsudo snap install \u003Csnap_name> Installs a Snap package.  \nsudo snap remove \u003Csnap_name> Removes a Snap package.  \nsudo snap refresh Updates all installed Snap packages.  \nsnap list Lists all installed Snap packages.  \nsnap info \u003Csnap_name> Displays information about a Snap package.  \nUsers and groups  \nUser management  \nw Shows which users are logged in.  \nsudo adduser \u003Cusername> Creates a new user.  \nsudo deluser \u003Cusername> Deletes a user.  \nsudo passwd \u003Cusername> Sets or changes the password for a user. su \u003Cusername> Switches user.  \nsudo passwd -l \u003Cusername> Locks a user account.  \nsudo passwd -u \u003Cusername> Unlocks a user password.  \nsudo chage \u003Cusername> Sets user password expiration date.  \nGroup management  \nid [username] Displays user and group IDs.  \ngroups [username] Shows the ","cbCaihDnCp4zcYmr","https://ap.wps.com/l/cbCaihDnCp4zcYmr","pdf",148626,"English","# System\n## System information\n## System monitoring and management\n## Running commands\n## Service management\n# Cron jobs and scheduling\n# Files\n## File management\n## Directory navigation\n## File permissions and ownership\n## Searching and finding\n## Archiving and compression\n# Text editing and processing\n# Packages\n## Package management (APT)\n## Package management (Snap)\n# Users and groups\n## User management\n## Group management\n# Networking\n## Netplan configuration\n## Firewall management\n# SSH and remote access\n# LXD\n## Creating instances\n## Managing instances","[{\"question\":\"How can I check system details like kernel and machine info on Ubuntu?\",\"answer\":\"Use uname -a for system information, hostnamectl for hostname details, and lscpu for CPU architecture information. timedatectl status shows current system time.\"},{\"question\":\"What commands help me monitor processes and system resources in real time?\",\"answer\":\"Use top or htop for real-time process viewing, df -h for disk usage, and free -m for memory availability. The kill \\u003cprocess id\\u003e command terminates a process.\"},{\"question\":\"How do I manage services and view logs with systemd?\",\"answer\":\"Start, stop, check status, and reload services with systemctl commands (start/stop/status/reload). Use journalctl -f for live log output, or journalctl -u \\u003cunit_name\\u003e for logs from a specific systemd unit.\"}]","Ubuntu CLI Cheat Sheet - Quick Reference | PDF",1791915351]