20 Helpful Linux Commands You Should Know

Rmag Breaking News

Linux offers a ton of commands that can be used to perform various operations, ranging from simply creating a new file, to complex system controls, all from your terminal. Today we will be looking at 20 of these helpful commands. Let’s go!

lscpu – Lists the CPU info of device.

apt list – Lists all available packages. Add (–installed) to search for only the installed ones.

cmatrix – Creates a cool matrix look in your terminal (( apt install cmatrix )).

ps – Lists all the running processes.

top – Displays info of all the running processes in your terminal.

ps aux – Prints out the complete proccess table of the kernel

ps -A – List all current process

kill – stops a process. (( kill [process id] ))

exit  – Terminates the current open proccess.

chsh – Changes the login shell ((shell that boots up first in the terminal))

echo $$ – Prints the calling parent proccess id.

echo $PID_MAX – Prints out the maximum number of proccess that can be run simultaneously in the machine.

ls -F – Lists contents of the current directory, and also adds / to the end of each directory name, to signify it’s a directory.

echo $PATH | sed ‘s/:/n/g’ – Prints each directory contained in the the environment PATH variable, one directory per line.

echo off – Disable visibility of characters entered in the terminal(can be used for password input). The opposite is used to turn it back on.

whereis – Prints out the file path(whereabout)of a linux command or file i.e (whereis command) .

uname – Prints out the name of the operating system.

cat /etc/*os-release – Prints out the details of the distro u’re using.

echo $? – Prints out the exit code of the previous command.

diff – Shows the difference between the two files specified.

That is all for this article. Hope you’ve been able to learn something new today 😊. If you have any questions or suggestions, don’t hesitate to drop them in the comment section. Till then, happy coding!🤗

Leave a Reply

Your email address will not be published. Required fields are marked *