Bash SHELL commands are primarily used in Unix-like operating systems, including Linux, macOS, and Debian distros like Ubuntu and in docker containers where you have bash shell. Bash (Bourne Again SHell) is a popular shell and command language interpreter that provides a command-line interface for interacting with the operating system.
Here are some of the most commonly used Bash commands:
alias: Creates aliases for frequently used commands.
awk: A powerful text processing tool for pattern matching and data manipulation.
cat: Displays the contents of a file.
cd: Changes the current directory.
chmod: Changes the permissions of files and directories.
chown: Changes the ownership of files and directories.
cp: Copies files and directories.
cut: Extracts sections from lines of files or input.
df: Shows disk space usage of file systems.
diff: Compares files line by line and shows differences.
du: Displays disk usage information for files and directories.
echo: Prints text or variables to the console.
find: Searches for files and directories based on various criteria.
grep: Searches for specific patterns or text in files.
gzip gunzip: Compresses or decompresses files using gzip.
head: Outputs the first part of files or input.
history: Lists previously executed commands.
less: Displays the contents of a file in a paginated manner.
ls: Lists the files and directories in the current directory.
man: Displays the manual pages for a command or topic.
mkdir: Creates a new directory.
mount / umount: Mounts or unmounts file systems.
mv: Moves or renames files and directories.
nano / vim: Text editors for creating or modifying files.
paste: Combines lines from multiple files side by side.
ps: Lists running processes.
pwd: Prints the current working directory.
rm: Removes files and directories.
sed: Stream editor for modifying text.
sort: Sorts lines of text in a file or input.
source or .: Executes a script in the current shell environment.
ssh: Connects to a remote server via SSH.
sudo: Executes a command with administrative privileges.
tail: Outputs the last part of files or input.
tar: Archives or extracts files from a tarball.
top: Displays real-time information about system processes.
touch: Creates an empty file or updates the timestamp of an existing file.
uniq: Filters out duplicate lines from sorted input.
wc: Counts the number of lines, words, and characters in a file or input.
wget: Downloads files from the web.
which: Shows the location of a command.
zip / unzip: Creates or extracts ZIP archives.
These are just a few examples of commonly used Bash commands. Bash provides a rich set of commands and utilities that allow you to perform various tasks in a command-line environment. You can explore the Bash documentation or online resources for more commands and their usage.