BASH Commands
Hey Friends!๐๐
Welcome to the world of BASH commands โ the building blocks of efficient and powerful command-line interactions. In this comprehensive guide, weโll explore a wide range of BASH commands, from basic file management to advanced text processing and system administration tasks. Whether youโre a novice user or an experienced sysadmin, this guide will equip you with the knowledge and skills to navigate the command line with confidence.
Basic Navigation Commands
cd
(Change Directory): Use this command to change your current working directory. For example:1
cd Documents
ls
(List): Use this command to list the contents of a directory. For example:1
ls -l
pwd
(Print Working Directory): Use this command to print the current working directory. For example:1
pwd
File Management Commands
cp
(Copy): Use this command to copy files or directories. For example:1
cp file1.txt file2.txt
mv
(Move): Use this command to move files or directories. For example:1
mv file1.txt new_location/
rm
(Remove): Use this command to delete files or directories. For example:1
rm file.txt
Text Processing Commands
grep
: Use this command to search for patterns in text files. For example:1
grep "pattern" file.txt
sed
(Stream Editor): Use this command to perform text transformations. For example:1
sed 's/old_text/new_text/' file.txt
awk
: Use this command for text processing and data extraction. For example:1
awk '{print $1}' file.txt
System Administration Commands
ps
(Process Status): Use this command to list running processes. For example:1
ps aux
top
: Use this command to monitor system resource usage. For example:1
top
chmod
(Change Mode): Use this command to change file permissions. For example:1
chmod 755 file.txt
Advanced Commands
find
: Use this command to search for files or directories. For example:1
find / -name "filename"
tar
(Tape Archive): Use this command to create or extract tar archives. For example:1
tar -cvf archive.tar directory/
grep
: Use this command to search for patterns in files. For example:1
grep "pattern" file.txt
Conclusion
Wooopphooop congratulations! Youโve now learned about a wide range of BASH commands, from basic navigation to advanced system administration tasks. With these commands in your toolkit, youโll be well-equipped to tackle a variety of tasks on the command line. So go ahead, practice your skills, and explore the power of BASH commands in your everyday computing tasks.