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

Linux Commands Cheat Sheet

The document provides a cheat sheet of common Linux commands, organized into categories including displaying information, files and directories, management, and other. It lists the command name, a brief description of its function, and some usage notes. Key commands include ls to list files, pwd to print the working directory, diff to compare files, grep to search within files, and cd to change directories. The cheat sheet offers a handy reference for basic Linux tasks like manipulating files, viewing system information, and assessing network connectivity.

Uploaded by

Erdem Enust
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views

Linux Commands Cheat Sheet

The document provides a cheat sheet of common Linux commands, organized into categories including displaying information, files and directories, management, and other. It lists the command name, a brief description of its function, and some usage notes. Key commands include ls to list files, pwd to print the working directory, diff to compare files, grep to search within files, and cd to change directories. The cheat sheet offers a handy reference for basic Linux tasks like manipulating files, viewing system information, and assessing network connectivity.

Uploaded by

Erdem Enust
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Linux Commands Cheat Sheet

Action Command Notes

Display Information
Compare Two Files Line by Line diff Enter the diff command followed by the file names of the items that you wish to compare.

Learn About a Command --help Enter a command followed by --help to display information about that command.

Access Manual Pages man Type man and a command (e.g., man itconfig) to get detailed help for a command.

List Files ls Enter to see the contents of a directory.

Print Working Directory pwd Enter to display the file path of your current working directory.

Compare Two Files Line by Line diff Enter the diff command followed by the file names of the items that you wish to compare.

Search Within Files grep Use to search for a string of characters in a specific file.

Display the Current Logged-In whoami Enter to display the username of the current user.
User
Display and Modify Network itconfig When executed without any additional options, itconfig displays all network interfaces on the system, along
Interfaces with their current statuses.

Display Network Connections netstat Enter to see all the network connections and traffic.
and Traffic
Display the Current Computer arch Enter to see the current computer architecture.
Architecture
Files and Directories
Change Directory cd Enter cd [path of the directory] to move from your current location to that directory. Enter cd .. to go to the
parent directory of your current location.
Make Directory mkdir Use to create a new directory (e.g., mkdir brand_new_folder).

Move Files and Directories mv Use to relocate files and folders to new locations (or to rename them).

Copy Files and Directories cp Use to copy files and directories across different locations.

Create Archives / Extract zip / unzip Use zip to create compressed archive files and unzip to extract archive files.
Archive Files
Create and Extract Tar Archives Tar Use tar (“tape archive”) to save several files into an archive file (“tarball”). Use the -c flag to create a tarball,
the -x flag for extraction, and the -f flag to specify the file.
Management
Execute Commands With Sudo Use to run a single command with temporary elevated privileges. Following completion, you will revert to
Root Privileges standard user status.

Change Mode chmod Use to change the permissions for specific roles – file owner, group, and all other users and groups.

Other
Download From the Web curl Use to transfer data to or from a server (see also: wget). To download a file using curl, use this command
structure: curl --output
Download From the Web wget Like the curl command, wget is a tool for downloading from the internet. Wget can also be used to interact
with REST APIs.
Assess Network Connectivity ping Check the status of your network, test that a remote host is available, and even send data.

You might also like