Top 10 most useful Linux commands

In this post, I list some of the most basic but most useful Linux commands for Linux novices. You can type these commands to manage your server. These commands are the easiest for beginners learning VPS or Linux server management.

  1. list command
    ls -a
    ls -l
    ls -l | more
  2. Extract the tar.gz file
    tar -xzf filename.tar.gz
  3.  Install the package
    yum install package_name // for Centos and Redhat
    apt-get install package_name// for Debian/Ubuntu
  4. Viewing memory info
    top

    free
  5. View disk usage
    df -h
  6. view the running process
    ps aux
  7. Delete all files in the folder
    rm -rf /path
  8. Edit files
    nano /file_path
  9. Change permissions and ownership
    chmod -R 755 /folder_path
    chown pbu /file_name
    chgrp mygrp /file_name
  10. View open ports
    netstat -nap –tcp