{"id":24005,"date":"2024-01-31T13:20:27","date_gmt":"2024-01-31T13:20:27","guid":{"rendered":"https:\/\/linuxways.net\/?p=24005"},"modified":"2024-01-31T13:25:50","modified_gmt":"2024-01-31T13:25:50","slug":"fix-sudo-command-not-found-debian-12","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/debian\/fix-sudo-command-not-found-debian-12\/","title":{"rendered":"How to Fix \u201csudo command not found\u201d in Debian 12"},"content":{"rendered":"<p><strong>sudo<\/strong> also known as <strong>Super User Do, <\/strong>is a command line utility that enables Debian users to execute the command with root privileges. It is a great way to give admin rights to users without sharing the root password. Depending on the configuration of the<strong>\/etc\/sudoers<\/strong> file, you can perform various tasks as an admin or regular user.<\/p>\n<p>Sometimes when Debian users try to run the sudo command, the error occurs saying: <strong>sudo command not found<\/strong>. This error prevents users from performing activities on the system, such as updating the repository, installing the applications, and more.<\/p>\n<p><strong>Quick Outline<\/strong><\/p>\n<ul>\n<li><a href=\"#post-24005-_heading=h.10rttv3ez2jn\"><strong>Why Does the \u201csudo command not found\u201d error occurs in Debian 12<\/strong><\/a><\/li>\n<li><a href=\"#post-24005-_heading=h.m2dqrsrsffn5\"><strong>How to Fix \u201csudo command not found\u201d in Debian 12<\/strong><\/a><\/li>\n<li><a href=\"#post-24005-_heading=h.qushas7y2s88\"><strong>Conclusion<\/strong><\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2><a id=\"post-24005-_heading=h.10rttv3ez2jn\"><\/a><strong>Why Does the \u201csudo command not found\u201d error occurs in Debian 12<\/strong><\/h2>\n<p>The <strong>sudo<\/strong> allows users to run commands that they do not run with normal users. While working on the Debian terminal, users sometimes face an error that says: \u201c<strong>sudo command not found<\/strong>\u201d or \u201c<strong>[user_name] is not in the sudo group<\/strong>\u201d.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"678\" height=\"79\" class=\"wp-image-24019\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-1.png 678w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-1-300x35.png 300w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/p>\n<p>There can be various reasons for the occurrence of the <strong>sudo command not found <\/strong>error on Debian:<\/p>\n<ul>\n<li>The sudo utility is not installed on your Debian system.<\/li>\n<li>The <strong>$PATH variable <\/strong>is not properly set or included in the directory that contains sudo executables.<\/li>\n<li>The user is not in the sudo group.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2><a id=\"post-24005-_heading=h.m2dqrsrsffn5\"><\/a><strong>How to Fix \u201csudo command not found\u201d in Debian 12<\/strong><\/h2>\n<p>If you are encountering the above-mentioned error on your system, you can fix it by:<\/p>\n<ul>\n<li><a href=\"#post-24005-_heading=h.q9wqzs9jh3c8\"><strong>Installing sudo in Debian 12<\/strong><\/a><\/li>\n<li><a href=\"#post-24005-_heading=h.sijkbhzal87n\"><strong>Modifying PATH Variable<\/strong><\/a><\/li>\n<li><a href=\"#post-24005-_heading=h.5y90k4ylk8hy\"><strong>Giving sudo Privileges to a User in Debian 12<\/strong><\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><a id=\"post-24005-_heading=h.q9wqzs9jh3c8\"><\/a><strong>1: Install sudo in Debian 12<\/strong><\/h3>\n<p>If you are receiving an error \u201c<strong>sudo command not found\u201d, <\/strong>then it is possible that sudo is not installed on your system. To install <strong>sudo<\/strong> on Debian 12, properly follow the below-given steps:<\/p>\n<p><strong>Step 1: <\/strong>First, switch to the root user on Debian 12 using the following command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">su<\/span> -<\/div><\/div>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"699\" height=\"98\" class=\"wp-image-24023\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-2.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-2.png 699w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-2-300x42.png 300w\" sizes=\"auto, (max-width: 699px) 100vw, 699px\" \/><\/strong><\/p>\n<p><strong>Step 2: <\/strong>Then run the update command to update the Debian repository before installing <strong>sudo<\/strong>:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">apt update<\/div><\/div>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"814\" height=\"297\" class=\"wp-image-24027\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-3.png 814w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-3-300x109.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-3-768x280.png 768w\" sizes=\"auto, (max-width: 814px) 100vw, 814px\" \/><\/strong><\/p>\n<p><strong>Step 3: <\/strong>Once the process of updating the repository completes, execute the install command to install the <strong>sudo<\/strong> on your system:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">apt <span class=\"kw2\">install<\/span> <span class=\"kw2\">sudo<\/span> <span class=\"re5\">-y<\/span><\/div><\/div>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"816\" height=\"253\" class=\"wp-image-24033\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-4.png 816w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-4-300x93.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-4-768x238.png 768w\" sizes=\"auto, (max-width: 816px) 100vw, 816px\" \/><\/strong><\/p>\n<p><strong>Step 4: <\/strong>Once <strong>sudo<\/strong> is installed on your system, exit the root user using the following command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw3\">exit<\/span><\/div><\/div>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"621\" height=\"103\" class=\"wp-image-24039\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-5.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-5.png 621w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-5-300x50.png 300w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/strong><\/p>\n<p>Else, you can switch to another using the following command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">su<\/span> username<\/div><\/div>\n<p>&nbsp;<\/p>\n<h3><a id=\"post-24005-_heading=h.sijkbhzal87n\"><\/a><strong>2: Modify PATH Variable in Debian 12<\/strong><\/h3>\n<p>When you execute the command, the shell finds the appropriate related program using the <strong>PATH<\/strong> variable which contains the list directories. Sometimes the directory containing <strong>sudo<\/strong> is not added to the <strong>PATH<\/strong> variable. You can view the directory of the <strong>sudo<\/strong> binary file using the following command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">which<\/span> <span class=\"kw2\">sudo<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"689\" height=\"89\" class=\"wp-image-24042\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-6.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-6.png 689w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-6-300x39.png 300w\" sizes=\"auto, (max-width: 689px) 100vw, 689px\" \/><\/p>\n<p>To check your current <strong>PATH <\/strong>on Debian, execute the below command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw3\">echo<\/span> <span class=\"re1\">$PATH<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"745\" height=\"117\" class=\"wp-image-24052\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-7.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-7.png 745w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-7-300x47.png 300w\" sizes=\"auto, (max-width: 745px) 100vw, 745px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>If the directory containing sudo is not added in the current PATH, then modify the PATH by adding the sudo directory. Here the path for the sudo directory is \/<strong>usr\/bin<\/strong>, execute the following command to add the PATH:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw3\">export<\/span> <span class=\"re2\">PATH<\/span>=<span class=\"re1\">$PATH<\/span>:<span class=\"sy0\">\/<\/span>usr<span class=\"sy0\">\/<\/span>bin<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"753\" height=\"166\" class=\"wp-image-24056\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-8.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-8.png 753w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-8-300x66.png 300w\" sizes=\"auto, (max-width: 753px) 100vw, 753px\" \/><\/p>\n<p>Moreover, you can also open the <strong>bash configuration<\/strong> file by executing the following command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">nano<\/span> ~<span class=\"sy0\">\/<\/span>.bashrc<\/div><\/div>\n<p>Add the following line at the end of this file and save the file:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw3\">export<\/span> <span class=\"re2\">PATH<\/span>=<span class=\"st0\">&quot;\/usr\/bin:<span class=\"es2\">$PATH<\/span>&quot;<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"743\" height=\"390\" class=\"wp-image-24069\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-9.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-9.png 743w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-9-300x157.png 300w\" sizes=\"auto, (max-width: 743px) 100vw, 743px\" \/><\/p>\n<p>To apply the changes either restart the terminal or execute the following command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw3\">source<\/span> ~<span class=\"sy0\">\/<\/span>.bashrc<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"709\" height=\"75\" class=\"wp-image-24081\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-10.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-10.png 709w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-10-300x32.png 300w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" \/><\/p>\n<p>You should now be able to use sudo privileges to execute commands on your system.<\/p>\n<p>&nbsp;<\/p>\n<h3><a id=\"post-24005-_heading=h.5y90k4ylk8hy\"><\/a><strong>3: Give sudo Privileges to a User in Debian 12<\/strong><\/h3>\n<p>For running the <strong>sudo command<\/strong> for regular users, you should add that user to the sudo group. The reason is due to security reasons, the sudo privileges is disabled for normal users on the Debian system.<\/p>\n<p>You can add a user to a sudo group in Debian 12 through the following two ways:<\/p>\n<ul>\n<li><a href=\"#post-24005-bookmark=id.x2pttty01825\"><strong>Terminal<\/strong><\/a><\/li>\n<li><a href=\"#post-24005-bookmark=id.hqbj6a9vvqui\"><strong>GUI<\/strong><\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2><strong>Add User to a sudo Group in Debian 12 Through the Terminal<\/strong><\/h2>\n<p>You can follow one of these mentioned methods to add any user to a sudo group in Debian:<\/p>\n<ul>\n<li><a href=\"#post-24005-bookmark=id.xv07krbwtzuh\"><strong>usermod Command<\/strong><\/a><\/li>\n<li><a href=\"#post-24005-bookmark=id.2oqod5xgw5xo\"><strong>Edit a sudoers File<\/strong><\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><strong>1: Add User to a sudo Group in Debian 12 with usermod Command<\/strong><\/h3>\n<p>Adding a user to the sudo group will give all the sudo privileges and they can run any command using the <strong>sudo <\/strong>as a prefix. To add a user to a sudo group on Debian, you can use the <strong>usermod <\/strong>command given below:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> usermod <span class=\"re5\">-aG<\/span> <span class=\"kw2\">sudo<\/span> username<\/div><\/div>\n<p>Here:<\/p>\n<p><strong>-a<\/strong>: It appends the user to a specified group without removing the user from the existing group.<\/p>\n<p><strong>-G<\/strong>: It specifies the group to add the user to.<\/p>\n<p>Here, I am giving sudo privileges to a user <strong>linuxways <\/strong>on Debian using the below command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> usermod <span class=\"re5\">-aG<\/span> <span class=\"kw2\">sudo<\/span> linuxways<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"778\" height=\"126\" class=\"wp-image-24093\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-11.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-11.png 778w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-11-300x49.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-11-768x124.png 768w\" sizes=\"auto, (max-width: 778px) 100vw, 778px\" \/><\/p>\n<p>Run the below-written command on the terminal to verify whether the user is added to sudo users or not:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">groups<\/span> linuxways<\/div><\/div>\n<p>&nbsp;<\/p>\n<h3><strong>2: Add User to a sudo Group in Debian 12 by Editing a sudoers File<\/strong><\/h3>\n<p>You can also edit the sudoers file to add any user to the sudo group and for that, you first need to switch to the root user from the following command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">su<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"782\" height=\"119\" class=\"wp-image-24107\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-12.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-12.png 782w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-12-300x46.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-12-768x117.png 768w\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" \/><\/p>\n<p>Next, preview the <strong>visudo file<\/strong> using any editor on your system; as in the below example, I am using nano editor to open and edit the file:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">visudo<\/div><\/div>\n<p>OR<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">nano<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>sudoers<\/div><\/div>\n<p>Write the below-written line under the <strong>User privilege specification<\/strong> and replace the <strong>username <\/strong>with the specified name of the user you want to give the user sudo privileges:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">username <span class=\"re2\">ALL<\/span>=<span class=\"br0\">&#40;<\/span>ALL:ALL<span class=\"br0\">&#41;<\/span> ALL<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"806\" height=\"473\" class=\"wp-image-24113\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-13.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-13.png 806w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-13-300x176.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-13-768x451.png 768w\" sizes=\"auto, (max-width: 806px) 100vw, 806px\" \/><\/p>\n<p>Use <strong>Ctrl + X<\/strong>, add<strong> Y<\/strong> and press <strong>Enter<\/strong> to save the file<strong>.<\/strong><\/p>\n<p>Once done following the above-mentioned steps, you should be able to run the <strong>sudo<\/strong> command now:<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"818\" height=\"199\" class=\"wp-image-24122\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-14.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-14.png 818w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-14-300x73.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-14-768x187.png 768w\" sizes=\"auto, (max-width: 818px) 100vw, 818px\" \/><\/strong><\/p>\n<h2><strong>How to <\/strong><a id=\"post-24005-bookmark=id.hqbj6a9vvqui\"><\/a><strong>Add a User to sudo Group in Debian 12 Through GUI<\/strong><\/h2>\n<p>You can also add a user to a sudo group from system settings in Debian using the following steps:<\/p>\n<p><strong>Step 1: <\/strong>First, navigate to <strong>Activities<\/strong> and open the <strong>Settings <\/strong>of the system:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"744\" height=\"445\" class=\"wp-image-24133\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-15.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-15.png 744w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-15-300x179.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-15-501x300.png 501w\" sizes=\"auto, (max-width: 744px) 100vw, 744px\" \/><\/p>\n<p><strong>Step 2<\/strong>: Scroll down to find the <strong>Users<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"498\" class=\"wp-image-24140\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-16.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-16.png 750w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-16-300x199.png 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/p>\n<p><strong>Step 3: <\/strong>Click on <strong>Unlock<\/strong> and enter the administrative password to continue:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"754\" height=\"492\" class=\"wp-image-24146\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-17.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-17.png 754w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-17-300x196.png 300w\" sizes=\"auto, (max-width: 754px) 100vw, 754px\" \/><\/p>\n<p><strong>Step 4: <\/strong>Under <strong>Other Users, <\/strong>click on the name of the user you want to add to a sudo group:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"749\" height=\"486\" class=\"wp-image-24154\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-18.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-18.png 749w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-18-300x195.png 300w\" sizes=\"auto, (max-width: 749px) 100vw, 749px\" \/><\/p>\n<p><strong>Step 5: <\/strong>Turn the toggle on for <strong>Administrator<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"757\" height=\"493\" class=\"wp-image-24159\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-19.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-19.png 757w, https:\/\/linuxways.net\/wp-content\/uploads\/2024\/01\/word-image-24005-19-300x195.png 300w\" sizes=\"auto, (max-width: 757px) 100vw, 757px\" \/><\/p>\n<p>This will add the users to a sudo group in Debian 12 from GUI.<\/p>\n<p>&nbsp;<\/p>\n<h2><a id=\"post-24005-_heading=h.qushas7y2s88\"><\/a><strong>Conclusion<\/strong><\/h2>\n<p>In Debian 12<strong>, sudo<\/strong> provides users a convenient way to temporarily grant other users access to system resources, such as updating or installing packages. While using sudo sometimes, users may encounter the <strong>sudo command not found <\/strong>error on Debian. This error mostly occurs when <strong>sudo<\/strong> is not installed, variable PATH is not properly set or the user is not added to a <strong>sudo <\/strong>group. To resolve this error, install the <strong>sudo<\/strong>, add the user to a sudo group through the terminal or GUI, or add the directory that contains sudo executable files to the PATH variable so the system can execute it. The above-mentioned guide will help you fix these issues so that you will be able to run sudo commands and manage packages on your system.<\/p>","protected":false},"excerpt":{"rendered":"<p>To fix the \u201csudo command not found\u201d in Debian 12, install the sudo, modify the PATH variable, or add a user to a sudo group.<\/p>","protected":false},"author":115,"featured_media":24200,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-24005","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debian"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/24005","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=24005"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/24005\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/24200"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=24005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=24005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=24005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}