Linux Useful Commands

  • Set the Target IP Address to the $ip system variable
    export ip=192.168.1.100

  • Find the location of a file
    locate sbd.exe

  • Search through directories in the $PATH environment variable
    which sbd

  • Find a search for a file that contains a specific string in it’s name:
    find / -name sbd\*

  • Show active internet connections
    netstat -lntp

  • Change Password
    passwd

  • Verify a service is running and listening
    netstat -antp |grep apache

  • Start a service
    systemctl start ssh

    systemctl start apache2

  • Have a service start at boot
    systemctl enable ssh

  • Stop a service
    systemctl stop ssh

  • Unzip a gz file
    gunzip access.log.gz

  • Unzip a tar.gz file
    tar -xzvf file.tar.gz

  • Search command history
    history | grep phrase_to_search_for

  • Download a webpage
    wget http://www.cisco.com

  • Open a webpage
    curl http://www.cisco.com

  • Set the Target IP Address to the $ip system variable
    export ip=192.168.1.100

  • Find the location of a file
    locate sbd.exe

  • Search through directories in the $PATH environment variable
    which sbd

  • Find a search for a file that contains a specific string in it’s name:
    find / -name sbd\*

  • Show active internet connections
    netstat -lntp

  • Change Password
    passwd

  • Verify a service is running and listening
    netstat -antp |grep apache

  • Start a service
    systemctl start ssh

    systemctl start apache2

  • Have a service start at boot
    systemctl enable ssh

  • Stop a service
    systemctl stop ssh

  • Unzip a gz file
    gunzip access.log.gz

  • Unzip a tar.gz file
    tar -xzvf file.tar.gz

  • Search command history
    history | grep phrase_to_search_for

  • Download a webpage
    wget http://www.cisco.com

  • Open a webpage
    curl http://www.cisco.com

Leave a Reply

Your email address will not be published. Required fields are marked *