ubuntu cmd

ubuntu command

  1. sudo:this SuperUserDo is the most important command linux website will use.Every single command that needs roots’s permisision,need this sudo command. you can use sudo before each command that requires root permissions.

    $sudo su 
    
  2. ls:with list command,you will see all the files and folders of the directory that you’re working in

    $ls
    
  3. cd:changing directory is the main command that always be in use in terminal.

    $cd
    
  4. mkdir : change directory is sitll incomplete. sometimes you want to create a new folder or subfoler. you can use mkdir command to do that.Just give your folder name after mkdir command in your teminal

    $mkdir folderName
    
  5. cp :copy and paste is the important task we need to do to organize our files. using cp will help you to copy file from terminal. first you determine the file you want to copy and type the destination location to paste

    $cd src des
    
  6. rm:rm is a command to remove your file or even your dictory. you can use -f if the file need root permission to be removed.And also you can use -r to do recurisve removal to remove your folder

    $rm myfile.txt
    
  7. apt-get:this command differs distro-by-distro. In Debian based distributions,to install remove and upgrade any package we’ve Advanced Packaging Tool (APT) package manager. The apt-get command will help you installing the software you need to run in your Linux. It is a powerful command-line tool which can perform installation, upgrade, and even removing your software.In other distributions, such as Fedora, Centos there are different package managers. Fedora used to have yum but now it has dnf.

    $sudo apt-get update
    $sudo dnf update
    
  8. grep: you need to find a file but you don’t remember its exact location or the path. grep will help you solve this issue .you can use the grep command to help finding the file based on given keywords

    $grp use /etc/passwd
    
  9. cat: as a user, you often need to view some of text or code from you script.Again,one of the Linux basic commands is cat command. it will show you the text inside your file.

    $cat CMakeLists.txt
    
  10. poweroff: sometimes you need to poweroff directly from your terminal. this command wil do the task. Don’t forget to add sudo at the beginning of the command since it needs root permission to execute poweroff.

    $sudo poweroff