<<

Comptia A+ Cheat Sheet

Basic Syntax command [options…] [arguments…]

Navigating the Filesystem Administrative Access Filesystem Management

pwd [OPTIONS] su OPTIONS USERNAME mv (s) Move Files Prints the working directory, your Allows you to temporarily act as a current location within the lesystem. dierent by creating a new . mv mv File_Name New_File_Name Rename Files su - Con gures the new shell with cp [OPTIONS] SOURCE DESTINATION cd [options] [path] [OPTIONS] FILE su -l the settings of the new user. rm Copy Files Navigates the lesystem structure by Remove Files changing directories. su --login chown [OPTIONS] [OWNER] FILE cd [OPTIONS] OPERAND Changes the ownership of a le. Copy Files the bit level Filesystem Path Shortcuts Allows a user to execute a command as another user. . Current Directory / Root Directory Permissions sudo -u To specify a dierent user account use the -u option. .. ~ Home Directory Changes the permissions of a le.

ls [OPTIONS] [FILE] Lists the contents of a directory.

ls -l Use long listing format

Filtering Input Shutting Down

grep [OPTIONS] PATTERN [FILE] shutdown [OPTIONS] [MESSAGE]

Regular Expression Patterns Display Network Con guration

Basic Regex Character(s) || Meaning Displays wireless network ifcon g ifcon g [OPTIONS] ifwcon g con guration information. Displays network con guration information. . Any one single character * Zero or of the previous character If rst character in the pattern, then Viewing Processes [ ] Any one speci character ^ pattern must be at beginning of the line [^ ] Not the one speci ed character ps [OPTIONS] $ If last character in the pattern, then pattern must be at the end of the line ps -e Display every process ps -f Display additional details

Package Management Updating User

Advanced Package Tool apt-get Print status information of passwd [OPTIONS] [USER] passwd -S current users : sudo apt-get update Refresh package list Change the password of the current user apt-cache search [keyword] Search for packages by keyword sudo apt-get [package] Install a package

sudo apt-get upgrade Update all package and dependencies sudo apt-get remove [package] Remove a package

sudo apt-get purge [package] Purge a package completely from the system

Learn Linux for Free Need to refresh your Linux skills? NDG’s free online tutorial (Linux Unhatched) covers everything you need to know to successfully install and configure Linux. Want more? Our Linux Essentials course—available for free through the Cisco Networking Academy—teaches the fundamentals of the Linux OS, command line, and basic open source concepts. Learn more at: netdevgroup.com/LinuxCheatSheet Comptia A+ Linux Cheat Sheet

Basic Command Syntax command [options…] [arguments…]

Navigating the Filesystem Administrative Access Filesystem Management

pwd pwd [OPTIONS] su su OPTIONS USERNAME mv mv File(s) Directory Move Files Prints the working directory, your Allows you to temporarily act as a current location within the lesystem. dierent user by creating a new shell. mv mv File_Name New_File_Name Rename Files su - Con gures the new shell with cp cp [OPTIONS] SOURCE DESTINATION cd cd [options] [path] rm [OPTIONS] FILE su -l the settings of the new user. rm Copy Files Navigates the lesystem structure by Remove Files changing directories. su --login chown chown [OPTIONS] [OWNER] FILE cd dd [OPTIONS] OPERAND Changes the ownership of a le. Copy Files at the bit level Filesystem Path Shortcuts sudo Allows a user to execute a command as another user. . Current Directory / Root Directory Permissions sudo -u To specify a dierent user account use the -u option. .. Home Directory ~ Home Directory chmod Changes the permissions of a le.

ls ls [OPTIONS] [FILE] Lists the contents of a directory.

ls -l Use long listing format

Filtering Input Shutting Down

grep grep [OPTIONS] PATTERN [FILE] shutdown shutdown [OPTIONS] TIME [MESSAGE]

Regular Expression Patterns Display Network Con guration

Basic Regex Character(s) || Meaning Displays wireless network ifcon g ifcon g [OPTIONS] ifwcon g con guration information. Displays network con guration information. . Any one single character * Zero or more of the previous character If rst character in the pattern, then Viewing Processes [ ] Any one speci ed character ^ pattern must be at beginning of the line [^ ] Not the one speci ed character ps ps [OPTIONS] $ If last character in the pattern, then pattern must be at the end of the line ps -e Display every process ps -f Display additional details

Package Management Updating User Passwords

Advanced Package Tool apt-get Print status information of passwd passwd [OPTIONS] [USER] passwd -S current users password: sudo apt-get update Refresh package list Change the password of the current user apt-cache search [keyword] Search for packages by keyword sudo apt-get install [package] Install a package

sudo apt-get upgrade Update all package and dependencies sudo apt-get remove [package] Remove a package

sudo apt-get purge [package] Purge a package completely from the system

Learn Linux for Free Need to refresh your Linux skills? NDG’s free online tutorial (Linux Unhatched) covers everything you need to know to successfully install and configure Linux. Want more? Our Linux Essentials course—available for free through the Cisco Networking Academy—teaches the fundamentals of the Linux OS, command line, and basic open source concepts. Learn more at: netdevgroup.com/LinuxCheatSheet