sudo [command]
Replace [command] with your command.
2. ls
ls is a basic Linux Ubuntu command used to list files and directories. The command comes with so many features like you can check hidden files and directories, permissions, and many more things. Here are the uses of the ls command:
• ls show you a list of files and directories;
• ls -l long list format with extended information;
• ls -a show you hidden files and folders;
• ls -h shows a list along with the size of files and directories.
Example of ls command:
ls -lha
The above command will show you a list of files and folders along with hidden files and their size.
3. Cd
cd stands for change directory. It is used to navigate from one directory to another. In simple words, the cd command allows the user to change the directory. It is the most important and widely used Ubuntu command. The use of this command as follows:
- cd ~ leads you to the home directory;
- cd / leads you to the root directory;
- cd .. leads you up one directory level;
- cd - leads you to the previous directory;
Example of Cd command:
To move from root to the download folder following command will be used.
cd Downloads
4. Cp
cp stands for the copy. This command is used to copy files, groups of files, or directory from one destination to another.
To use this command, type the filename and the location where you want to copy that specific file.
For example:
cp ABC /root/Downloads/
The above command will copy the ABC file to the Downloads folder.
5. Mv
mv stands for the move. This Ubuntu command is used to move one or more files or directory from one place to another. The usage of this command is the same as the cp command, Just use mv instead of cp to use this command.
Syntax: mv
6. Rm
The rm command is mainly used to delete the files or directories. The uses of this command are shown below:
• rm <filename> remove a file;
• rm -r <directory name> remove directories and their contents recursively;
• rm -rf < directory name> remove directories and their contents forcefully;
• rm -rf * remove everything forcefully present inside the directory.
Note: Don't run rm -rf * command in the root directory.
7. Rmdir
rmdir command allows you to delete an empty directory. This command is of no use, You can use the rm -r command to remove the directory along with its content.
Syntax: rmdir
8. Mkdir
The use of the mkdir command is to create directories. For example, mkdir Ubuntu will create a directory named Ubuntu.
Syntax: mkdir
9. History
history command shows a list of all previously typed commands. You can also clear the history of your previously typed command by using history -c.
Syntax: history
10. Pwd
pwd stands for print working directory. It prints the path of the directory in which you are present.
Syntax: pwd
11. Clear
Clear command is used to clear the screen of the terminal. Simply type clear to clear the terminal screen.
Syntax: clear
12. Date
use this command to display the current date and time. This command allows the user to print the current date and time on the Ubuntu terminal.
Syntax: date
13. Cal
This command allows the user to display a calendar on the terminal.
Syntax: cal
14. Cat
Cat stands for concatenate. It is a widely used command in Linux distributions, especially in Ubuntu. Cat command helps users to create, view the content of the files.
• cat <filename> To view the content of the file;
• cat >Ubuntu It will create a file named Ubuntu.
Syntax: cat
replace <filename> with the name of the file that you want to view.
15. Uname -a
uname -a used to display information about the system on the terminal screen. Use this command to see the architecture, Version, etc. of your Ubuntu system.
• uname -a prints all information about the system;
• uname -s Prints kernel name on the terminal screen;
• uname -n shows the hostname of your computer;
• uname -m shows the hardware architecture of your computer;
• uname -o shows the name of your operating system;
• uname -v shows the version information.
Syntax: uname
16. Passwd
passwd is the most important command of Ubuntu. It is used to change the password of a user account. Only the root user has permission to change the password of any user. Normal user can change the password of his/her own account.
For example:
passwd [username]
Syntax: passwd
Replace the [username] with your username.
17. Apt-get
Apt stands for advanced packaging tool. apt-get is the most useful command in Ubuntu Linux. It is mainly used to install, remove, update, upgrade the package, and repository.
Its main task is to retrieve the data and packages from the verified sources for the repository. It has the ability to upgrade and remove the packages along with their dependencies.
The usage of this command as follows:
• apt-get update. This command is used to update the system repository. You always have to use this command before performing an upgrade or dist upgrade.
apt-get update
• apt-get upgrade. Use this command to upgrade the packages that are currently installed in your system. The packages that are present in sources. list repository will be upgraded. You must always use the update command before upgrading your system. The update command will get the latest version of packages and the upgrade command will upgrade those packages.
apt-get upgrade
• apt-get dist-upgrade. Use this command to upgrade your packages. This command also handles dependencies with new versions of packages. Running this command may remove some old packages.
apt-get dist-upgrade
• apt-get install [package name]. This command is used to install or upgrade the packages.
apt-get install [package name]
• apt-get remove [package name]. Use this Ubuntu command to remove the packages. It does not remove any files that are created by a package.
apt-get remove [package name]
• apt-get purge [package name]. The use of this command is to remove the packages along with the configuration files associated with the packages.
apt-get purge [package name
18. Whatis
Whatis command is used to get brief information about the Linux commands and its functions.
Examples of whatis command:
whatis dpkg
whatis zip
whatis cat
Syntax: whatis [package name]
19. Zip
Zip command is used to compress the file in .zip extension. Zip can reduce file size up to 62 percent by compressing it into the .zip format.
zip ubuntu.zip ubuntu.txt
The above command will compress ubuntu.txt into ubuntu.zip.
unzip ubuntu.zip
Sir can u tell me how to increase Instagram followers
ReplyDeleteSir can i use this comnd in termux
ReplyDeleteGitHub - MFDGaming/ubuntu-in-termux: This is a script by which you can install Ubuntu in your termux application without a rooted device.
Delete