Linux commands

  • sudo su

    Change to root user

  • cat filename.txt

    Reads the contents of filename.txt file

  • cat >> filename.txt

    Write to filename.txt. If the file exists, it will be emptied but if the file does not exists, it will be created. Use ctrl+d to exit.

  • gedit helloWorld.txt

    helloworld.txt file will be opened in edit mode

  • nano helloWorld.txt

    helloworld.txt file will be opened in edit mode

  • free -hm

    Displays the free space in memory(RAM)

  • top

    Displays all the process in run and the usage of memory and CPU in percentage

  • zip -r temp.zip Documents
    If you want to archive a folder named “Documents” in a zip file named “temp.zip”.

  • mv file1 /tmp
    To move the file file1 from the current working directory to the /tmp directory.

Labels: , ,

© copyright-2020 Rejaul