From 36dbbfdeb75cda3a4868e8dc9d987778209f007a Mon Sep 17 00:00:00 2001 From: Joseph Jacob Date: Wed, 11 Dec 2024 21:25:11 +0530 Subject: [PATCH] Linux Commands : Basics --- .../LinuxCommands.md | 67 ++++++++++++++++++- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/Linux_Commands_Shell_Scripting/LinuxCommands.md b/Linux_Commands_Shell_Scripting/LinuxCommands.md index 90aee9e..c69bc60 100644 --- a/Linux_Commands_Shell_Scripting/LinuxCommands.md +++ b/Linux_Commands_Shell_Scripting/LinuxCommands.md @@ -1,14 +1,75 @@ # Linux Commands -## Ubuntu +## Package Management ### ```apt-get``` * ``` apt-get clean ``` - removes the downloaded .deb packages from cache in /var/cache/apt/archives/ -* ``` apt-get autoclean ``` - cleans the local repository of retrieved packages but only for the packages that you have uninstalled or those with no newer versions available. +* ``` apt-get autqoclean ``` - cleans the local repository of retrieved packages but only for the packages that you have uninstalled or those with no newer versions available. * ``` apt-get autoremove ``` - removes the unneeded packages that were once installed as a dependency + +## Process Management + +### `killall` +used to kill all process by name or command. + +### `pstree` +Display a tree view of processes + +### `htop` +It is similar to top, but allows you to scroll vertically and horizonā€ +tally, and interact using a pointing device (mouse) + +## System Information +### `uname` + +## User and Group Management + +### `useradd` + +### `userdel` + +### `usermod` + +### `passwd` + +### `id` + +### `groups` + +### `groupdel` + +### `groupadd` + +## Network Configuration and Monitoring + +### `netstat` + +### `ip` + +### `ss` +Used to show "Socket Statistics" . + +* `ss --summary` - To get a summary +* `ss --process` - To get list process info like PID along listening ports etc + +### `traceroute` + +### `ssh` + +### `nc` + +## Misc + ### ```printenv``` -* Displays all the environment variables delared \ No newline at end of file +* Displays all the environment variables delared + + +## References +* https://substack.com/@rockybhatia/note/c-79923887?r=40ln3j +* Linux man pages +* https://www.geeksforgeeks.org/ss-command-in-linux/ +* https://www.cyberciti.biz/faq/unix-linux-killall-command-examples-usage-syntax/ \ No newline at end of file