Linux is one of the most popular open-source operating system. It has different distributions and designed for different purposes. But here is some 10 basic commands which every User should know:
It’s short form for “Super User Do” , this command is used when we need to root user access or permission.
$ sudo apt install package_name
$ sudo apt update
This command is used to display the content of folder. we can use it to display files and folders with different ways:
$ ls -l
$ ls -a
$ ls -R
$ ls -al
This command is used to copy the files from one to another folder. Example
$ cp test.html /var/www/html/
mv command is used to move and rename files. Example
$ mv test.html /var/www/html/
$ mv test.html demo.html
It’s short form of Change Directory, this command is used to change directory. For example if you want to go Music directory from Video then use cd command.
$ cd /var/www/html
$ cd ..
This command is used to delete directory and content within directory, it may be files or directory.
$ rm -r
This command is used to create files. Example
$ touch filename.extension
This command is used to create directory. Example
$ mkdir Movies
This command is used to change read, write and execute permission of files and directory.
$ chmod -R 777 Movies
This command is used to change the owner of particular file or directory. For example if you have directory created as root but you want change the owner then use chown
$ sudo chown ravi Movies/