![]() Test the sudo command using the process shown above. Save and exit the file and reload it by running the command below: Open the file in your preferred text editor and append the following line at the end of the file: If the output doesn’t have the /usr/bin/sudo folder, add it to the PATH variable by modifying the /etc/environment file. To check the PATH variable’s contents, run the command below: If the sudo command is not in the PATH variable, you’ll have to add the folder manually. If the terminal prompts you for the root password and “Hello World” is printed on the terminal output, then the sudo command is now working correctly.Ģ.Add the sudo Folder to the PATH Variable ![]() Once you’ve installed the sudo package, test it by running the command below: If you’re unsure whether the sudo package is installed on your Linux distribution, you can install it by running the command below: Now that you understand what causes the error, let’s take a look at how to fix it.įixing the “sudo: command not found” Error1. The sudo command is not accessible: When the sudo binary is not executable, you’ll receive the “sudo: command not found” error.If you’re using a non-standard distribution, the PATH variable may not include the folder that contains the sudo command. The sudo command is not present in the PATH variable: When you run commands in Linux, the terminal uses a PATH variable to search for available system commands.The sudo package is not installed: This issue primarily occurs when you’re trying to run sudo for administrative tasks, but the sudo package is not installed on your system.The “sudo: command not found” error may occur due to several reasons, including: What Causes the “sudo: command not found” Error? In this article, we’ll show you how to fix the “sudo: command not found” error on Linux. The sudo command is fundamental as it allows you to run administrative actions safely. One such issue is the “sudo: command not found” error. When working with Linux, you may come across errors that need fixing to continue using this operating system optimally. Linux is an open-source operating system known for its flexibility and security, making it one of the most preferred operating systems in the world.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |