Top 50 Linux Commands for Users

Posted by

  1. ls: Lists directories in the current directory.
    Example: ls -l lists details of files and directories.
  2. cd: Changes the current directory.
    Example: cd /path/to/directory.
  3. pwd: Prints the current directory.
    Example: pwd.
  4. cat: Displays the content of a file.
    Example: cat filename.
  5. echo: Outputs the strings it is being passed as arguments.
    Example: echo "Hello, World!".
  6. touch: Creates a new empty file.
    Example: touch filename.
  7. rm: Removes files.
    Example: rm filename.
  8. cp: Copies files and directories.
    Example: cp source destination.
  9. mv: Moves or renames files.
    Example: mv old_filename new_filename.
  10. mkdir: Creates a new directory.
    Example: mkdir directoryname.
  11. rmdir: Removes an empty directory.
    Example: rmdir directoryname.
  12. find: Searches for files in a directory hierarchy.
    Example: find . -name "*.txt".
  13. grep: Searches the given input files for lines containing a match to the given patterns.
    Example: grep "pattern" filename.
  14. head: Outputs the first part of files.
    Example: head filename.
  15. tail: Outputs the last part of files.
    Example: tail filename.
  16. cut: Removes sections from each line of files.
    Example: cut -c 1-10 filename.
  17. sort: Sorts lines in text files.
    Example: sort filename.
  18. uniq: Filters out repeated lines from sorted files.
    Example: uniq filename.
  19. diff: Compares files line by line.
    Example: diff file1 file2.
  20. cmp: Compares two files byte by byte.
    Example: cmp file1 file2.
  21. ln: Creates links between files.
    Example: ln -s target linkname.
  22. tar: Archives files.
    Example: tar cvf archive.tar directoryname.
  23. gzip: Compresses files.
    Example: gzip filename.
  24. gunzip: Decompresses files.
    Example: gunzip filename.gz.
  25. man: Provides manual pages for commands.
    Example: man ls.
  26. uname: Prints system information.
    Example: uname -a.
  27. whoami: Prints effective userid.
    Example: whoami.
  28. date: Displays or sets the system date and time.
    Example: date.
  29. df: Reports disk space usage.
    Example: df -h.
  30. du: Estimates file and directory space usage.
    Example: du -sh directoryname.
  31. ping: Tests network connectivity.
    Example: ping www.google.com.
  32. netstat: Displays network connections.
    Example: netstat.
  33. route: Shows or modifies kernel routing tables.
    Example: route -n.
  34. wget: Downloads files from the internet.
    Example: wget http://example.com.
  35. curl: Transfers data to or from a server.
    Example: curl http://example.com.
  36. ssh: Secure shell login to remote servers.
    Example: ssh username@hostname.
  37. scp: Secure copy files to and from remote hosts.
    Example: scp file username@hostname:/path.
  38. vi: A text editor.
    Example: vi filename.
  39. nano: A simple text editor.
    Example: nano filename.
  40. top: Displays dynamic real-time view of a running system.
    Example: top.
  41. ps: Reports a snapshot of the current processes.
    Example: ps -ef.
  42. kill: Sends signals to processes.
    Example: kill -9 pid.
  43. killall: Sends signals to all instances of a particular process.
    Example: killall processname.
  44. traceroute: Traces and displays the route that a packet takes to reach a network host.
    Example: traceroute www.google.com.
  45. ifconfig: Configures network interface parameters.
    Example: ifconfig.
  46. ufw: Uncomplicated Firewall.
    Example: ufw enable.
  47. iptables: User-space utility program that allows a system administrator to configure the IP packet filter rules of the Linux kernel firewall.
    Example: iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT.
  48. apt: Advanced package management command line tool.
    Example: apt update && apt upgrade.
  49. pacman: Package management utility in Arch Linux.
    Example: pacman -Syu.
  50. yum: Yellowdog Updater Modified, a package manager for RPM-based Linux distributions.
    Example: yum update.
5 1 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x