Most Commonly Used Linux Command

As a Cloud / DevOps Engineer , I'm passionate about transforming businesses by architecting and scalable cloud solutions. With a strong foundation on AWS , Docker , Kubernetes , Jenkins , Terraform . My expertise in designing and managing cloud environments . Let's collaborate to take your digital journey to new heights with cloud technology. 🚀 #CloudEngineering
pwd: Print the current working directory.
ls: List the files and directories in the current directory.
- To list hidden files, use
ls -a.
- To list hidden files, use
cd: Change the current directory.
To go to the home directory, use
cd ~.To go up one directory, use
cd ...
mkdir: Create a new directory.
- For example,
mkdir my_directorywill create a directory named "my_directory".
- For example,
touch: Create an empty file.
- For example,
touch my_file.txtwill create a file named "my_file.txt".
- For example,
rm: Remove files or directories.
To remove a file, use
rm filename.To remove a directory and its contents, use
rm -r directoryname(be careful with this command).
cp: Copy files or directories.
To copy a file, use
cp source file destination.To copy a directory and its contents, use
cp -r source directory destination.
mv: Move or rename files or directories.
To move a file or directory, use
mv source destination.To rename a file or directory, use
mv oldname newname.
cat: Display the contents of a file.
- For example,
cat my_file.txtwill display the contents of "my_file.txt".
- For example,
grep: Search for text within files.
- For example,
grep "search_term" filenamewill search for "search_term" in "filename".
- For example,
man: Access the manual pages for a command.
- For example,
man lswill display the manual for thelscommand.
- For example,
ps: List running processes.
ps auxwill display a list of all running processes.
kill: Terminate a process.
- Use
kill process_idto send a signal to a process to stop it.
- Use
chmod: Change file permissions.
- For example,
chmod 755 myfilewill give read, write, and execute permissions to the owner and read and execute permissions to others.
- For example,
chown: Change file ownership.
- For example,
chown user:group myfilewill change the owner and group of "myfile."
- For example,
Day 3 of #90DaysOfDevOps ( Basic Linux Command )
hope you liked it .......
#DevOps #Cloud #90DaysOfDevOps
#linux #Linux #DevOps #linux #cloud #LinuxVsWindows
#operatingsystem #90daysofdevops #tws




