linux-essentials-commands
linux-essentials-commands
1. `ls` - Lists files and directories in the current directory. Example: `ls -la`
9. `find` - Searches for files and directories. Example: `find / -name "file.txt"`
11. `less` - Views file content one page at a time. Example: `less file.txt`
12. `nano` or `vim` - Opens text editors to modify files. Example: `nano file.txt`
13. `head` / `tail` - Displays the beginning (`head`) or end (`tail`) of a file. Example: `tail -n 10 log.txt`
16. `id` - Displays user ID (UID) and group ID (GID). Example: `id username`
19. `sudo` - Executes a command as another user, typically the superuser. Example: `sudo apt
update`
22. `ps` - Shows current processes. Example: `ps aux | grep process_name`
23. `kill` - Terminates a process. Example: `kill 1234` (where 1234 is the process ID).
25. `du` - Displays directory or file size. Example: `du -sh folder/`
31. `curl` / `wget` - Fetches files from the web. Example: `curl http://example.com`
32. `traceroute` - Traces the route packets take to a destination. Example: `traceroute google.com`
33. `nslookup` - Queries DNS for domain information. Example: `nslookup example.com`
36. `zip` / `unzip` - Creates or extracts zip files. Example: `unzip archive.zip`
37. `apt` - Manages packages. Example: `sudo apt update && sudo apt install package-name`
38. `dpkg` - Installs or removes .deb packages. Example: `sudo dpkg -i package.deb`
42. `man` - Displays manual pages for commands. Example: `man ls`