The stream of characters input by the user by some input device, often represented as stream 0
The stream of characters output by the terminal, often represented as stream 1
The stream of characters output by the terminal that occur due to a caught error, often represented as stream 2
Streams above 2 are legal however are custom
("A" 2)
Addition
1+2
Unary positive, makes number positive
+2
Subtraction
2-1
Unary negative, makes number negative
-2
Multiplication
2*3
Division
4/2
Modulo (remainder of division)
4%2
Indice
4**2
Increment
Decrement
Equals (no space between variable and value)
x=2
Is equal to
Is not equal to
Greater than
Less than
Greater than or equal to
Less than or equal to
Returns true if string is null
Returns true if string is not null
Is equal to
Is not equal to
Greater than (ASCII order)
Less than (ASCII order)
Greater than or equal to (ASCII order)
Less than or equal to (ASCII order)
Returns true if string is null
Returns true if string is not null
Bitwise AND
Bitwise OR
Bitwise XOR
Arithmetic shift left (shifts all the bits one space to the left, essentially multiplying it by 2)
Logical shift right (shifts all the bits one space to the right, essentially dividing it by 2)
Bitwise NOT
AND operator
OR operator
NOT operator
Checks if file is block special file
Checks if file is character special file
Checks if directory exists
Checks if file exists
Checks if file has read permission
Checks if file has write permission
Checks if file has execution permission
Checks if file has size greater than 0
References a array's index
Defines conditions of a block
Initialises an array
Defines conditions of a block
Used for defining functions
Pipeline; makes output of left command the input for the right
Defines a mathematical expression
Shebang; declares script as executable, followed by path to be executed in
#!/bin/bash
Represents home directory
Represents a directory
Represents parent directory
Represents numbers between two integers
Represents current directory
Single character wildcard
Redirects stout to file
Redirects stdout to file
Redirects stream
Appends stdout to a file
Execute second command if first command has no error
Redirects command error output to file
Redirects command output to command error output
Redirects command error output to command output
Single character wildcard; represents a single character
Multiple character wildcard; represents zero or more characters
Represents variable array index in loops
Represents variable array index in loops
Variable substitution operator
Command substitution operator
Returns index of an object in an array in loops
Represents previous command
Variable operator
Declares a string
Declares a string
Declares a command output as a string
Returns amount of parameters listed on execution
Returns the parameters as one string
Returns the return result of last command
Returns the nth parameters
Returns the parameters as one string
Returns the file name of current script
Returns the OS type
Returns the current path
Returns the Process ID of the bash instance
Returns a random unsigned 16 bit integer
Executes code on true condition
Executes code on different cases
case variable in
case1) code;;
case2) code;;
case3) code;;
esac
Executes code for every object in list
for foo in ~/directory;
do
code
done
Loops code on true condition
while [ condition ]
do
code
done
while ( condition )
do
code
done
Loops code on false condition
until [ condition ]
do
code
done
until ( condition )
do
code
done
Defines a function
function name {
code
}
functionName() {
code
}
Links
Displays binary path for applications
Displays manual for certain command
man command
Displays explanation of a command
Calculates MD5 hash for a file
Displays the checksum of a file
Converts an input into base64
Decode base64 string into regular string
ignore all non-alphanumeric characters when decoding
Overwrites a file 35 times using the Gutmann method
Opens vim, a text editor
Displays a string
Do not print a trailing new line
Enable interpretation of backslash codes
Do not enable interpretation of backslash codes
Concatenates a file (creates, views and edits files
Searches for an expression in a text file
Returns count of different character objects for a given input
Display the difference between two ASCII files
Displays first 10 lines of a file
Displays last 10 lines of a file
Displays an input as pages
Formats JSON data
Displays a file interpreted as raw hexadecimal data
Opens file in CLI text editor
Sorts into alphabetical order
Cuts away unwanted columns of a record
Displays input with columns
Processes input text based on a provided programming
Stream Editor; replaces instances that match a pattern with a string
Returns pipelined file with no lines repeated
Retrieves files from the internet
Displays possible packet routes for a given IP or domain
Retrieves files from the internet
Interface Config; configures network interfaces
Wireless Interface Config; configures wireless network interface
Manages network options and displays network information
Start metapsloit
Resolves hostnames
Resolves DNS requesrs
Fuzzing application written in go
Retrieve repositories from git.com
Manages wireless connections
Controls the rtorrent application
Displays the status of each network port
pings a node
Displays the status of each network port
Alos used as nc, opens netcat; tool for network reading and writing
Opens a MySQL connection
Connects to a server's shell over RSA encryption
Connects to an RDP server over RSA encryption
Runs openvpn
Name Server Lookup; Retrieves corresponding IP to a DNS record
Replace bash process with another process
Removes a directory
Securely copy a file over SSH encryption
Default package manager for Arch
Manages packages from the yum repository
Manages packages for Debian-based distributions
Syncs directory to a network device
Tests download and upload speeds by Ookla Speedtest
Displays processes of the current shell
Allows user to manage computer resources (resource monitor)
Exits the terminal
Executes command as root
sudo command
-l, list sudo priveledges
Displays OS infromation
Displays system information
Lists information about CPU
Lists block devices
Lists information about USB devices
Disk Filesystem; displays information on filesystems
Displays information on memory
Lists PCI devices
Kills a task
Displays user's command history
Modifies current user password
Shuts computer down
Allows users to manage processes
Displays which user is currently on the terminal
Mounts a drive
Unmounts a drive
Modifies cronjobs (files executed at regular intervals)
Disk partiioning software
Controls the pulse audio application
Disk partitioning software
Shuts down the computer
Reboots the computer
Controls computer functionality such as graphics, terminal and power state
Returns the size of directory by recursively checking size of subdirectories
Lists contents of current directory
Finds and displays files and directories recursively
Prints a tree of the filesystem
Allows user to stop replacing command with a word
Prints the working directory
Changes the current directory
Copies a file
Removes a file
Moves a file
Makes a directory
Allows user to access and modify file modification times
Allows user to change file permissions through either normal or octal mode. In normal mode, a string describing the change of permissions is parsed. This string contains three parts; the users affected, the action, and the permissions in question.
In octal mode, you parse a 3 octal digits that represent the permissions of ugo respectively, where the bits of each digit represent rwx.
chmod [OPTION]... OCTAL-MODE FILE...
Unzips file
Searches for a file in directory
Makes a symlink (like a shortcut to another file on Windows)
Provides information on a file
file file.txt
Provides file metadata
Creates a zip file
Prints directrory
Extracts and creates archive files such as .zip and .7z files
Runs xorg
Displays an awesome matrix
Makes a file system on a drive
Set pacman mirrors
Controls the Polybar application
Opens xfce4 desktop
tr [OPTIONS]... STRING1 [STRING2]
Translates occurences of a specific string in an input with another string
Allows user to replace command with a word
Set a time delay for a program
Tests the terminal
Assigns a value to a variable
let "x = 1 + 2"
Tests the speed of various hardware peripherals
Used to tell compiler this line in the file is not to be compiled