60 Linux Commands in 6 Minutes!

60 Linux Commands in 6 Minutes!

Hey there, tech enthusiasts! Ever wondered how to boss around your computer using simple text commands? Well, we've got the scoop for you! In just 6 minutes, we're going to spill the beans on 60 Linux commands that will make you feel like a computer wizard.

Imagine telling your computer what to do, and it actually listens. That's the magic of Linux commands. Whether you're a tech pro or just getting started, these commands will turn you into a command-line superhero.

  1. ssh : used to connect to other systems remotely

    ssh user_name@hostName_or_IP

  2. ls : list file contents

    ls -l : list with more details

    ls -al : list hidden contents

  3. cd : change directory

    cd .. : move one directory above

    cd / : move to root directory

    cd /path : move to any directory

  4. pwd : shows present working directory

  5. touch : create file

    touch file.txt : can give any extension

    touch file1 file2 file3 : will create multiple files

    touch file{1..8} : will create files with characters of that range. (alphabets can also be used)

  6. echo : print any element

    echo "hello", echo "stuff stuff" > new_or_existing_file.txt

    (this will print the line in a new or existing file)

7. nano : text editor

ctrl x + y + enter to save

  1. vim : another text editor

    i :to go to insert mode

    esc :to go command mode

    wq : to save and quit

  2. cat : see contents of a file

    cat file_name

  3. shred : hide contents of a file

    shred file_name: unable to view file contents

  4. mkdir : create new folder

  5. cp : copy stuff : cp path path

  6. mv : move stuff : mv path path

  7. rm : remove stuff : rm path path

  8. rmdir : remove empty directory

  9. rm -r : remove directory with contents

  10. ls -s : find size of directory

  11. clear : clean stuff from terminal

  12. whoami : get username of system

  13. sudo : elevate access from regular user, more control

  14. sudo useradd name : add new user

  15. sudo adduser name : set user with more parameters

  16. su user_name : switch user

  17. exit : exit

  18. sudo passwd user_name: set passwd for user

  19. sudo apt update: for debian machines (debian, ubuntu)

    sudo yum update: for red hat machines (rhel, fedora)

  20. finger: used to inspect other user (might need to download finger)

    finger user_name

  21. man : now more about any command

    man cat, man finger

  22. whatis : one line explanation for every command

  23. which : which command : where particular command/file is located

  24. whereis : whereis commands: where all commands are located in the system

  25. wget link : donwload stufffrom internet

  26. curl link > file_name : can rename the downloaded file name when downloading

34. zip name.zip file_name : zips the file

unzip file.zip

  1. less file_name : show less content of a file

    head file_name : show topmost stuff of a file

    tail file_name : show bottom stuff of a file

  2. cmp file1_name file2_name : chk differences b/w files

  3. diff file1_name file2_name : tells what is the difference

  4. sort : sort stuff alphabetially

  5. find : sudo find / -name "filename" : to find stuff

    sudo find . -type f -name ".*" (hidden files)

    find . -type f -empty (find empty directories)

    find . -perm /a=x (executable files)

  6. chmod +x : make file executable

  7. chown : chown user_name file_name : change ownership of a file

  8. ifconfig : tell ip of system at top

  9. ipaddress : also tells ip at bottom

    sudo apt install net-tools : need this for ipaddress

  10. grep: filter things

  11. cat /etc/resolv.conf: chk local dns

  12. resolvectl status : chk online dns

  13. ping : chk web connecntions

  14. traceroute site_link : tells every hop a site has for our connection

  15. netsat: what ports are on linux machine

    netstat -tulpn : every switch of linux machine

  16. iptables: firewall management, allow or deny

  17. uname : system name

    uname -a : more info

  18. neofetch : same info, prettier (install neofetch)

  19. cal : open calender

  20. echo "4+5" | bc (solve any amth problem)

  21. free : chk free memory available

  22. df : chk disk space

  23. ps : list every process

  24. top : chk process using system stuff

    htop : prettier process checking

  25. kill : to kill a process , need process id

    ps -aux | grep thisisbash kill -9 pID (-9 is force kill)

    pkill : no pID needed ( pkill -f process_name)

  26. services:

    sudo systemctl start service_name

    sudo systemctl stop service_name

    sudo systemctl status service_name

    sudo systemctl restart service_name

  27. history: tells every commands used

  28. sudo reboot

    sudo shutdown (default takes 1 min)

    sudo shutdown -h now