Home  >  Article  >  Operation and Maintenance  >  What should I do if Linux prompts that the permissions are insufficient?

What should I do if Linux prompts that the permissions are insufficient?

angryTom
angryTomOriginal
2019-11-07 11:10:2319430browse

What should I do if Linux prompts that the permissions are insufficient?

What should I do if Linux prompts that the permissions are insufficient?

When using terminal commands or installing .deb installation packages in Linux, The problem of insufficient permissions often occurs, and there are many solutions, which are summarized below.

For the .deb installation package, if you encounter insufficient permissions, you can right-click and open it as an administrator

Use terminal commands to install When, if you enter apt-get install xxxxx, you will be prompted

无法打开锁文件 /var/lib/dpkg/lock - open (13: 权限不够)  无法对状态列表目录加锁(/var/lib/dpkg/),请查看您是否正以 root 用户运行?

The solution is: add sudo in front, that is, sudo apt-get install xxxxx

Enter in the terminal If you encounter permission problems when executing commands, another solution is to directly obtain root permissions. That is, execute sudo -s in the terminal, and then enter the password of the ordinary user currently logged in to enter the root user mode.

Not only when entering the installation command in the terminal, you can also enter other commands. Add "sudo" in front of the command to obtain relevant command permissions. For example, when copying files in folders such as usr, you can use sudo cp source target

Related commands preceded by "sudo" include move commands (mv initial address one target address two), Delete command (rm command) to delete a file in the usr folder. It cannot be deleted directly. You can use the command with sudo.

Another example is when the software installation is incomplete, Linux always prompts you to use the "apt-get check" command to check, but when you enter the "apt-get check" command in the terminal, it says that the permissions are insufficient. . In fact, you need to add sudo in front, that is, "sudo apt-get check" to solve the problem.

Recommended: linux system tutorial

The above is the detailed content of What should I do if Linux prompts that the permissions are insufficient?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to connect in linuxNext article:How to connect in linux