Here is a little list of terminal commands that you can find useful, I use some of them a lot and others from time to time.
- Print Current Working Directory. It will print the full path.
pwd
- List of current directory contents
ls
- Change the directory
cd DirectoryName
- To change to zsh shell.
chsh -s /bin/zsh
- Clear the terminal logs
clear or cls
- Copy files from the current directory to a different directory
cp source_file target_directory
- Move files from the current directory to a different directory
mv
- Make a new directory
mkdir NameNewDirectory
- Delete empty directories
rmdir
- Delete directories and contents within them (*be careful when using it)
rm DirectoryName
- Create a new blank file
touch
- Find a file
locate
- Search for files and directories within a given directory
find
- Search through all the text in a file
grep FileName
- Perform tasks that need admin or root permissions
sudo
- Get a report on the systems disk space usage (% and KBs)
df
- Check how much space a file or a directory take
du
- View the first few lines of a text file
head
- Display the last ten lines of a text file
tail
- Compare the contents of two different files, line by line
diff
- Archive multiple files into a group of files collected together as one
tar
- Change the read, write and execute permissions of files and directories
chmod
- Transfer the ownership of a file to the specified username
chown
- Display all current jobs along with their status
jobs
- Terminate a program manually
kill
- Check the connectivity status to a server
ping
- Download files from the internet
wget
- Display a list of running processes and how much CPU each process uses
top
- Get information about a Linux command
man
- Move data into a file
echo
- Compress files into a zip file
zip
- Extract a zip file
unzip
- Display the name of the host or network
hostname
- Create a new user
useradd
- Delete a user
userdel
- After creating a user, it can be used to set a password for that user
passed
Thanks for reading, I appreciate your time! 🎉 If you need any help please reach out!
If you have any questions feel free to drop me a message on LinkedIn or send me an email. 😊
Have a nice day!
Top comments (2)
Kill have en very nice switch -9
kill -9 <process>
-9 tells kill to DO IT, sometimes a process will not stop and -9 force it.Oh, I think your ordering meant:
Something like this right?