0% found this document useful (0 votes)
545 views

Comptia A+ Linux Cheat Sheet: Basic Command Syntax

This document provides a cheat sheet for Comptia A+ Linux commands and concepts. It includes sections on navigating the filesystem, administrative access, filesystem management, filtering input, package management, updating user passwords, shutting down, and displaying network configuration. The cheat sheet lists common Linux commands such as ls, cd, grep, apt-get, ifconfig, passwd, and shutdown along with brief descriptions and syntax examples.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
545 views

Comptia A+ Linux Cheat Sheet: Basic Command Syntax

This document provides a cheat sheet for Comptia A+ Linux commands and concepts. It includes sections on navigating the filesystem, administrative access, filesystem management, filtering input, package management, updating user passwords, shutting down, and displaying network configuration. The cheat sheet lists common Linux commands such as ls, cd, grep, apt-get, ifconfig, passwd, and shutdown along with brief descriptions and syntax examples.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

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
different user by creating a new shell.
current location within the filesystem. mv mv File_Name New_File_Name
Rename Files
su -
cd cd [options] [path] Configures the new shell with cp cp [OPTIONS] SOURCE DESTINATION
su -l the settings of the new user. rm rm [OPTIONS] FILE Copy Files
Remove Files
Navigates the filesystem structure by
changing directories. su --login chown chown [OPTIONS] [OWNER] FILE cd dd [OPTIONS] OPERAND
Changes the ownership of a file. Copy Files at the bit level

Filesystem Path Shortcuts


sudo Allows a user to execute a command as another user.
. Current Directory / Root Directory
sudo -u To specify a different user account use the -u option.
Permissions
.. Home Directory ~ Home Directory
chmod Changes the permissions of a file.

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 Configuration


Basic Regex Character(s) || Meaning Displays wireless network
ifconfig ifconfig [OPTIONS] ifwconfig configuration information.
Displays network configuration information.
. Any one single character * Zero or more of the previous character
If first character in the pattern, then
Viewing Processes
[] Any one specified character ^
pattern must be at beginning of the line
[^ ] Not the one specified 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


apt-get Advanced Package Tool
Print status information of
passwd passwd [OPTIONS] [USER] passwd -S current users password:
sudo apt-get update Refresh package list Change the password of
Search for packages by keyword the current user
apt-cache search [keyword] <User Name> <Password Status> <Change Date>
Install a package <Minimum> <Maximum> <Warning> <Inactive>
sudo apt-get install [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

You might also like