Linux Commands: Essentials
Being equipped with the general Linux commands in your toolkit is a really good thing as a software engineer. It is a sort of gray area in terms of what you are supposed to know and why can't someone google such stuff? Having a good understanding of what commands exist can give you a starting point from where to look. So let us dive straight in. I will keep updating this list as I find commands.
ls: The ls command can be used to list files.
ls -a
lists all the hidden files as wellls -R
recursively lists down all the files in the subdirectories.-t
option will sort the entries by modification date
cat: It is used to list the contents of the file.
-n :
Lists the contents of the file along with the line number.cat fileOne fileTwo :
Copies contents from file one to file two
tail: It is used to print the last 10 lines of the file.
- It can be used to continuously watch changes to a file
chmod: It is used to change file permissions in linux
- The digits 7, 5, and 4 each individually represent the permissions for the user, group, and others, in that order. Each digit is a combination of the numbers 4, 2, 1, and 0
grep : It is used to search regex in the file structure
ps: It is used to list processes.
ps -A: It is used to list all the running processes.
ps -p p_id: It is used to list the process with a given pid
aux: It displays a list of information you might need on how the different information reported by various lists of processes.
top: It is used to monitor the vitals of the system and can give you an overview of how your system is performing.
wget: It is used to download files from the internet.