{"id":6663,"date":"2023-02-26T06:28:54","date_gmt":"2023-02-26T06:28:54","guid":{"rendered":"https:\/\/linuxsimply.com\/?p=6663"},"modified":"2024-01-14T02:36:49","modified_gmt":"2024-01-14T02:36:49","slug":"what-is-sudo-in-linux","status":"publish","type":"post","link":"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/","title":{"rendered":"What is Sudo in Linux [A Detailed Review]"},"content":{"rendered":"<p style=\"text-align: justify;\"><strong>Sudo <\/strong>in <strong>Linux <\/strong>allows a user to run a command with <strong>elevated privileges<\/strong>. For instance, a <strong>hotel <\/strong>has different <strong>keys <\/strong>for different <strong>rooms<\/strong>. If you are a guest, you will only have the key to your room. But what if you want to access a restricted area? You need to get the key from the <strong>hotel manager<\/strong> as he has access to all the rooms. And by doing so, you are giving yourself some <strong>privileges <\/strong>of the hotel manager. This is what <strong>sudo <\/strong>does. It allows regular users to run certain commands and programs with the privileges of a &#8220;root&#8221; user.<\/p>\n<p style=\"text-align: justify;\">In this article, I will explain what is <strong>sudo <\/strong>in Linux\u00a0with 4 practical examples.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#What_is_%E2%80%9Csudo%E2%80%9D_in_Linux\" >What is &#8220;sudo&#8221; in Linux?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#Linux_%E2%80%9Csudo%E2%80%9D_Command_Syntax\" >Linux \u201csudo\u201d Command Syntax<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#Linux_%E2%80%9Csudo%E2%80%9D_Command_Options\" >Linux &#8220;sudo&#8221; Command Options<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#4_Examples_of_%E2%80%9Csudo%E2%80%9D_command_in_Linux\" >4 Examples of \u201csudo\u201d command in Linux<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#Example_1_Update_the_system_using_%E2%80%9Csudo%E2%80%9D\" >Example 1: Update the system using \u201csudo\u201d<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#Example_2_Execute_a_Command_as_a_Different_User_with_%E2%80%9Csudo%E2%80%9D\" >Example 2: Execute a Command as a Different User with &#8220;sudo&#8221;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#Example_3_List_the_Permissions_and_Privileges_with_%E2%80%9Csudo%E2%80%9D\" >Example 3: List the Permissions and Privileges with &#8220;sudo&#8221;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#Example_4_Run_Command_without_Password_Using_%E2%80%9Csudo%E2%80%9D\" >Example 4: Run Command without Password Using &#8220;sudo&#8221;<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#Frequently_Asked_Questions\" >Frequently Asked Questions<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#How_to_use_the_Linux_%E2%80%9Csudo%E2%80%9D_command\" >How to use the Linux &#8220;sudo&#8221; command?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#What_is_sudo_access\" >What is sudo access?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#How_do_I_enable_and_disable_sudo_access_in_Linux\" >How do I enable and disable sudo access in Linux?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#Can_I_switch_to_the_root_user_with_the_%E2%80%9Csudo%E2%80%9D_command\" >Can I switch to the root user with the &#8220;sudo&#8221; command?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#Can_I_run_multiple_commands_in_Linux_in_a_single_line_with_superuser_privileges\" >Can I run multiple commands in Linux in a single line with superuser privileges?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#What_is_the_difference_between_%E2%80%9Csu%E2%80%9D_and_%E2%80%9Csudo%E2%80%9D_command_in_Linux\" >What is the difference between &#8220;su&#8221; and &#8220;sudo&#8221; command in Linux?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"What_is_%E2%80%9Csudo%E2%80%9D_in_Linux\"><\/span>What is &#8220;sudo&#8221; in Linux?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\"><strong>sudo<\/strong>\u00a0stands for <strong>superuser do <\/strong>which enables users with the power to run some commands that only the <strong>superusers<\/strong> or <strong>root users<\/strong> are allowed to run. It temporarily elevates privileges to do sensitive tasks without logging in as the root user such as installing software, editing system configuration files, etc.<\/p>\n<p style=\"text-align: justify;\"><strong>Linux <\/strong>is a <strong>multi-user<\/strong> system where different users enjoy different privileges for <strong>security<\/strong> and <strong>administrative<\/strong> reasons. If everyone had all the privileges, the system would be at risk. For instance, a user could have deleted an important system file or installed harmful programs. However, prefixing with &#8220;sudo&#8221; allows the user proper permission to execute the command having administrative-like powers of the <strong>root user <\/strong>or <strong>superuser <\/strong>temporarily.<\/p>\n<p style=\"text-align: justify;\">By default, <strong>sudo<\/strong> necessitates the users to authenticate themselves with a password that is typically the user password.<\/p>\n<p style=\"text-align: justify;\"><div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#E8F9FC;border-color:#ffffff;color:#333333;\">\n<strong>Note:<\/strong> Even though <strong>root user <\/strong>and <strong>superuser <\/strong>are used <strong>interchangeably<\/strong>, there are slightly <strong>different<\/strong>. <strong>Superuser <\/strong>can also mean a user with <strong>elevated privileges<\/strong> granted by the <strong>system administrator<\/strong>.<\/p>\n<\/div><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Linux_%E2%80%9Csudo%E2%80%9D_Command_Syntax\"><\/span>Linux \u201csudo\u201d Command Syntax<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The <a href=\"https:\/\/linuxsimply.com\/sudo-command-in-linux\/\" target=\"_blank\" rel=\"noopener\"><strong>sudo command<\/strong><\/a> in <strong>Linux <\/strong>is used to grant <strong>root privileges<\/strong>. Its syntax goes like the following:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">sudo [OPTION]...[COMMAND]...<\/code><\/pre>\n<p style=\"text-align: justify;\"><div class=\"su-box su-box-style-default\" id=\"\" style=\"border-color:#aeb0b3;border-radius:0px;max-width:none\"><div class=\"su-box-title\" style=\"background-color:#E1E3E6;color:#000000;border-top-left-radius:0px;border-top-right-radius:0px\"> EXPLANATION<\/div><div class=\"su-box-content su-u-clearfix su-u-trim\" style=\"border-bottom-left-radius:0px;border-bottom-right-radius:0px\">\nIn the above syntax <strong>OPTION <\/strong>and <strong>COMMAND <\/strong>are enclosed by a <strong>square bracket <\/strong>and followed by <strong>3 dots<\/strong> represents that you can utilize multiple <strong>options <\/strong>and <strong>commands <\/strong>simultaneously.<\/p>\n<\/div><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Linux_%E2%80%9Csudo%E2%80%9D_Command_Options\"><\/span>Linux &#8220;sudo&#8221; Command Options<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">The <strong>sudo <\/strong>command in <strong>Linux <\/strong>provides a lot of options. You can check them by using the following command:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">man sudo<\/code><\/pre>\n<p>Below I have listed some useful <strong>options<\/strong> to use with the <strong>sudo<\/strong> command:<\/p>\n<div class=\"su-table su-table-responsive su-table-alternate su-table-fixed\">\n<table style=\"width: 80.2444%;height: 154px\" width=\"624\">\n<thead>\n<tr style=\"height: 10px\">\n<td style=\"height: 10px;width: 28.7688%\" width=\"312\">\n<p style=\"text-align: center\"><strong>Options<\/strong><\/p>\n<\/td>\n<td style=\"height: 10px;width: 76.0115%\" width=\"312\">\n<p style=\"text-align: center\"><strong>Description<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 15px\">\n<td style=\"height: 15px;width: 28.7688%\" width=\"312\"><strong>-u<\/strong><\/td>\n<td style=\"height: 15px;width: 76.0115%\" width=\"312\">Is used to execute commands with a different user.<\/td>\n<\/tr>\n<tr style=\"height: 25px\">\n<td style=\"height: 25px;width: 28.7688%\" width=\"312\"><strong>-l<\/strong>, <strong>&#8211; -list<\/strong><\/td>\n<td style=\"height: 25px;width: 76.0115%\" width=\"312\">shows the permissions and privileges of a user.<\/td>\n<\/tr>\n<tr style=\"height: 25px\">\n<td style=\"height: 25px;width: 28.7688%\" width=\"312\"><strong>-n<\/strong>, <strong>&#8211; -non-interactive<\/strong><\/td>\n<td style=\"height: 25px;width: 76.0115%\" width=\"312\">doesn\u2019t prompt for a <strong>user password<\/strong>.<\/td>\n<\/tr>\n<tr style=\"height: 25px\">\n<td style=\"height: 25px;width: 28.7688%\" width=\"312\"><strong>-b<\/strong>, <strong>&#8211; -background<\/strong><\/td>\n<td style=\"height: 25px;width: 76.0115%\" width=\"312\">runs commands in the background.<\/td>\n<\/tr>\n<tr style=\"height: 33px\">\n<td style=\"height: 33px;width: 28.7688%\" width=\"312\"><strong>-r<\/strong>, <strong>&#8211; -role<\/strong><\/td>\n<td style=\"height: 33px;width: 76.0115%\" width=\"312\">runs commands with <strong>SELinux <\/strong>security context.<\/td>\n<\/tr>\n<tr style=\"height: 10px\">\n<td style=\"height: 10px;width: 28.7688%\" width=\"312\"><strong>-e<\/strong><\/td>\n<td style=\"height: 10px;width: 76.0115%\" width=\"312\">edits one or multiple <strong>files <\/strong>instead of executing commands.<\/td>\n<\/tr>\n<tr style=\"height: 11px\">\n<td style=\"height: 11px;width: 28.7688%\" width=\"312\"><strong>-k<\/strong><\/td>\n<td style=\"height: 11px;width: 76.0115%\" width=\"312\">kills the <strong>timestamp <\/strong>of the user.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div> <div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#E8F9FC;border-color:#ffffff;color:#333333;\">\n<p><strong>Note:<\/strong> All options are <strong>case-sensitive<\/strong>.<\/p>\n<\/div><\/div>\n<h2><span class=\"ez-toc-section\" id=\"4_Examples_of_%E2%80%9Csudo%E2%80%9D_command_in_Linux\"><\/span>4 Examples of \u201csudo\u201d command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">Here, I will show you 4 examples of the <strong>sudo <\/strong>command in <strong>Linux<\/strong>. These examples will help you understand the concept better.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_1_Update_the_system_using_%E2%80%9Csudo%E2%80%9D\"><\/span>Example 1: Update the system using \u201csudo\u201d<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">In this example, I will <strong>update <\/strong>the system. As updating a system is a <strong>sensitive <\/strong>task, only<strong> root user<\/strong> has this privilege. I will use sudo to grant that access. Now to <strong>update <\/strong>your system using sudo, do the following:<\/p>\n<ol>\n<li>At first, launch an <strong>Ubuntu Terminal<\/strong>.<\/li>\n<li>Insert the following command in the command prompt and hit <strong>ENTER<\/strong>:\n<pre><code class=\"language-bash\" data-line=\"\">sudo apt-get update<\/code><\/pre>\n<\/li>\n<li>Provide the <strong>password <\/strong>to access <strong>root privileges <\/strong>and press <strong>ENTER <\/strong>.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">The \u201c<strong>apt-get update<\/strong>\u201d command <strong>updates <\/strong>the <strong>local package database<\/strong> with information of <strong>latest software packages<\/strong> and it won\u2019t work without proper <strong>privileges <\/strong>and <strong>permissions<\/strong>. In the output, I have used <strong>sudo <\/strong>to take advantage of <strong>root privileges<\/strong>. And as you can see, the system is <strong>updating <\/strong>successfully.<img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-6664 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-1.png\" alt=\"Explaining &quot;what is sudo in Linux&quot; by updating system\" width=\"825\" height=\"362\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-1.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-1-300x132.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-1-766x336.png 766w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_2_Execute_a_Command_as_a_Different_User_with_%E2%80%9Csudo%E2%80%9D\"><\/span>Example 2: Execute a Command as a Different User with &#8220;sudo&#8221;<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Now I will <strong>execute <\/strong>a command with the <strong>privileges <\/strong>of a <strong>different user <\/strong>instead of current user. For instance, my <strong>current user<\/strong> name is \u201c<strong>walid<\/strong>\u201d. However, my system has <strong>another user<\/strong> named \u201c<strong>jim<\/strong>\u201d and I want to execute a command as \u201c<strong>jim<\/strong>\u201d. I can do that by using the \u201c<strong>-u<\/strong>\u201d <strong>option <\/strong>of command <strong>sudo<\/strong>. Now to execute a command as a <strong>different user<\/strong>, follow the steps below:<\/p>\n<ol>\n<li>Launch a <strong>Terminal <\/strong>in <strong>Ubuntu <\/strong>first.<\/li>\n<li>Write the following command in the <strong>Terminal <\/strong>and press <strong>ENTER<\/strong>:\n<pre><code class=\"language-bash\" data-line=\"\">sudo -u jim ls \/var<\/code><\/pre>\n<\/li>\n<li>Provide <strong>password <\/strong>of the <strong>current user\u00a0<\/strong>and hit the <strong>ENTER\u00a0<\/strong>key.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">Here I have listed the contents of the \u201c<strong>\/var<\/strong>\u201d <strong>directory<\/strong>. You can do anything you want but make sure that the user has proper <strong>permissions<\/strong>.<img decoding=\"async\" class=\"aligncenter wp-image-6665 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-2.png\" alt=\"Executing a command as a different user using sudo\" width=\"700\" height=\"148\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-2.png 700w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-2-300x63.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-2-766x162.png 766w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_3_List_the_Permissions_and_Privileges_with_%E2%80%9Csudo%E2%80%9D\"><\/span>Example 3: List the Permissions and Privileges with &#8220;sudo&#8221;<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">If you want to <strong>check <\/strong>whether you have <strong>root privileges<\/strong> or not, you can use the \u201c<strong>-l<\/strong>\u201d <strong>option <\/strong>of the <strong>sudo <\/strong>command. To <strong>list <\/strong>the <strong>permissions <\/strong>and <strong>privileges <\/strong>of a user, do the following:<\/p>\n<ol>\n<li>Press <strong>CTRL + ALT + T<\/strong>, to open an <strong>Ubuntu Terminal<\/strong>.<\/li>\n<li>Copy the following command in the <strong>Terminal <\/strong>and hit <strong>ENTER<\/strong>:\n<pre><code class=\"language-bash\" data-line=\"\">sudo -l<\/code><\/pre>\n<\/li>\n<li>Give your <strong>password <\/strong>and press <strong>ENTER <\/strong>from the keyboard.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">As you can see, in my case, the user \u201c<strong>walid<\/strong>\u201d is also the <strong>root user<\/strong>. In the output, \u201c<strong>(ALL : ALL) ALL<\/strong>\u201d denotes that user \u201c<strong>walid<\/strong>\u201d have <strong>permissions <\/strong>to execute <strong>all commands<\/strong>.<img decoding=\"async\" class=\"aligncenter size-full wp-image-6666\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-3.png\" alt=\"\" width=\"825\" height=\"322\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-3.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-3-300x117.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-3-766x299.png 766w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_4_Run_Command_without_Password_Using_%E2%80%9Csudo%E2%80%9D\"><\/span>Example 4: Run Command without Password Using &#8220;sudo&#8221;<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">When you use \u201c<strong>sudo<\/strong>\u201d, you are prompted for a <strong>password<\/strong>. However, the \u201c<strong>-n<\/strong>\u201d <strong>option <\/strong>provides to run commands <strong>without <\/strong>a <strong>password<\/strong>. You only need to enter the <strong>password once<\/strong>. Now to <strong>run <\/strong>a <strong>command without password<\/strong>, run the following command in your terminal:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">sudo -n apt-get update<\/code><\/pre>\n<p style=\"text-align: justify;\">In <strong>Example 1<\/strong>, I have <strong>updated <\/strong>the system as well. If you can remember, it was asking for a <strong>password <\/strong>back then. But in this case, it isn\u2019t prompting for any <strong>password <\/strong>even though I am using <strong>sudo<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6667 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-4.png\" alt=\"Using sudo without password\" width=\"825\" height=\"384\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-4.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-4-300x140.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-4-767x357.png 767w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">Learning \u201c<strong>what is sudo in Linux<\/strong>\u201d is very important for any type of user. In this article, I have tried to provide a comprehensive view of <strong>sudo<\/strong>. Hopefully, you have got everything you need.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Frequently_Asked_Questions\"><\/span>Frequently Asked Questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"How_to_use_the_Linux_%E2%80%9Csudo%E2%80%9D_command\"><\/span>How to use the Linux &#8220;sudo&#8221; command?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">To use the Linux <strong>sudo<\/strong> command is very easy. Type the command you intend to run with root privileges and prefix it with the command &#8220;sudo&#8221;. For instance, to update the system using <strong>\u201capt\u201d<\/strong>, type:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">sudo apt update<\/code><\/pre>\n<p style=\"text-align: justify;\">Upon pressing the <strong>ENTER <\/strong>button, you will be prompted to enter the user password to finally update with superuser privileges.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"What_is_sudo_access\"><\/span>What is sudo access?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\"><strong>Sudo access<\/strong> is a feature in Unix-based Operating systems such as Linux that allows users to run commands and programs with the privileges of another user, typically the administrator or the \u201croot\u201d user. Availing of sudo access means that the users can perform tasks that they are normally not allowed to do including installing software, editing system configuration files, managing users or groups, etc.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_do_I_enable_and_disable_sudo_access_in_Linux\"><\/span>How do I enable and disable sudo access in Linux?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">You can enable or disable sudo access in Linux by adding or removing the specific user name from the <strong>&#8221; sudoers &#8220;<\/strong> file. The file is typically located at <strong>\u201c\/etc\/sudoers\u201d<\/strong>. You can edit the sudoers file to add or omit the user\u2019s sudo access. For example, adding the line <strong>\u201cusername ALL=(ALL:ALL) ALL\u201d<\/strong> gives the username complete access to the <strong>sudo<\/strong> command.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Can_I_switch_to_the_root_user_with_the_%E2%80%9Csudo%E2%80%9D_command\"><\/span>Can I switch to the root user with the &#8220;sudo&#8221; command?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>Yes<\/strong>, you can. Type the following command in the terminal and press the <strong>ENTER<\/strong> button:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">sudo bash<\/code><\/pre>\n<p style=\"text-align: justify;\">This command effectively switches your command prompt to the bash shell as a root user. Your command shell will change to the following:<\/p>\n<p><strong>root@hostname:\/home\/[username]#<\/strong><\/p>\n<p>For instance, in the case of the username <strong>prem<\/strong>, the shell becomes: <strong>root@hostname:\/home\/prem#<\/strong><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Can_I_run_multiple_commands_in_Linux_in_a_single_line_with_superuser_privileges\"><\/span>Can I run multiple commands in Linux in a single line with superuser privileges?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\"><strong>Yes<\/strong>. The <strong>sudo<\/strong> command lets you run multiple commands in one line with root privileges. To do so, type the <strong>string of commands<\/strong> in the terminal separated by semicolons, and prefix them with sudo. For example, to run the commands <code class=\"\" data-line=\"\">ls<\/code>, <code class=\"\" data-line=\"\">whoami<\/code>, and <code class=\"\" data-line=\"\">hostname<\/code> with <strong>sudo<\/strong>, type the following command and press <strong>ENTER<\/strong>:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">sudo ls; whoami; hostname<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"What_is_the_difference_between_%E2%80%9Csu%E2%80%9D_and_%E2%80%9Csudo%E2%80%9D_command_in_Linux\"><\/span>What is the difference between &#8220;su&#8221; and &#8220;sudo&#8221; command in Linux?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">In Linux, the <strong>su (switch user)<\/strong> command lets the user log in as another user (often the root user) to access their files and system settings. Contrarily, the <strong>sudo<\/strong> command stands for <strong>\u201csuperuser do\u201d<\/strong> and allows the user to execute certain commands with privileges that only the root users have in general. It helps users to do tasks with administrative power without the need to log in exclusively as the root user.<\/p>\n<p><script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [{\n    \"@type\": \"Question\",\n    \"name\": \"What is sudo access?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"Sudo access is a feature in Unix-based Operating systems such as Linux that allows users to run commands and programs with the privileges of another user, typically the administrator or the \u201croot\u201d user. Availing of sudo access means that the users can perform tasks that they are normally not allowed to do including installing software, editing system configuration files, managing users or groups, etc.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"How do I enable and disable sudo access in Linux?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"You can enable or disable sudo access in Linux by adding or removing the specific user name from the \\\" sudoers \\\" file. The file is typically located at \u201c\/etc\/sudoers\u201d. You can edit the sudoers file to add or omit the user\u2019s sudo access. For example, adding the line \u201cusername ALL=(ALL:ALL) ALL\u201d gives the username complete access to the sudo command.\"\n    }\n  },{\n    \"@type\": \"Question\",\n    \"name\": \"What is the difference between su and sudo command in Linux?\",\n    \"acceptedAnswer\": {\n      \"@type\": \"Answer\",\n      \"text\": \"In Linux, the su (switch user) command lets the user log in as another user (often the root user) to access their files and system settings. Contrarily, the sudo command stands for \u201csuperuser do\u201d and allows the user to execute certain commands with privileges that only the root users have in general. It helps users to do tasks with administrative power without the need to log in exclusively as the root user.\"\n    }\n  }]\n}\n<\/script><\/p>\n<hr \/>\n<p><span style=\"color: #000080; font-size: 18pt;\"><strong>Similar Readings<\/strong><\/span><\/p>\n<ul>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/what-is-root-user-in-linux\/\" target=\"_blank\" rel=\"noopener\">What is Root User in Linux? [A Complete Guide]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/what-is-root-partition-in-linux\/\" target=\"_blank\" rel=\"noopener\">What is Root Partition in Linux? [A Complete Guide]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/what-is-root-directory-in-linux\/\" target=\"_blank\" rel=\"noopener\">What is Root Directory in Linux? [The Ultimate Guide]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/what-is-root-access-in-linux\/\" target=\"_blank\" rel=\"noopener\">What is Root Access in Linux [With Practical Examples]<\/a><\/strong><\/li>\n<\/ul>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-center kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;center&quot;,&quot;id&quot;:&quot;6663&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;4&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;5\\\/5 - (4 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;What is Sudo in Linux [A Detailed Review]&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 142.5px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            5\/5 - (4 votes)    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Sudo in Linux allows a user to run a command with elevated privileges. For instance, a hotel has different keys &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"What is Sudo in Linux [A Detailed Review]\" class=\"read-more button\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#more-6663\" aria-label=\"Read more about What is Sudo in Linux [A Detailed Review]\">Read more<\/a><\/p>\n","protected":false},"author":314893,"featured_media":6668,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[65],"class_list":["post-6663","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-glossary","tag-system-administration","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is Sudo in Linux [A Detailed Review]<\/title>\n<meta name=\"description\" content=\"Linux allows a user to execute a command with elevated privileges and the command used for that purpose is sudo. This is what sudo in Linux.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is Sudo in Linux [A Detailed Review]\" \/>\n<meta property=\"og:description\" content=\"Linux allows a user to execute a command with elevated privileges and the command used for that purpose is sudo. This is what sudo in Linux.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxSimply\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/walid.alasad.5\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-26T06:28:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-14T02:36:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-5.png\" \/>\n\t<meta property=\"og:image:width\" content=\"500\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Walid Al Asad\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Walid Al Asad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/what-is-sudo-in-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/what-is-sudo-in-linux\\\/\"},\"author\":{\"name\":\"Walid Al Asad\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/b54259fce1dc6e35d375984aff173ff0\"},\"headline\":\"What is Sudo in Linux [A Detailed Review]\",\"datePublished\":\"2023-02-26T06:28:54+00:00\",\"dateModified\":\"2024-01-14T02:36:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/what-is-sudo-in-linux\\\/\"},\"wordCount\":1449,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/what-is-sudo-in-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/what-is-sudo-in-linux-5.png\",\"keywords\":[\"system administration\"],\"articleSection\":[\"Linux Glossary\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/what-is-sudo-in-linux\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/what-is-sudo-in-linux\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/what-is-sudo-in-linux\\\/\",\"name\":\"What is Sudo in Linux [A Detailed Review]\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/what-is-sudo-in-linux\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/what-is-sudo-in-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/what-is-sudo-in-linux-5.png\",\"datePublished\":\"2023-02-26T06:28:54+00:00\",\"dateModified\":\"2024-01-14T02:36:49+00:00\",\"description\":\"Linux allows a user to execute a command with elevated privileges and the command used for that purpose is sudo. This is what sudo in Linux.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/what-is-sudo-in-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/what-is-sudo-in-linux\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/what-is-sudo-in-linux\\\/#primaryimage\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/what-is-sudo-in-linux-5.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/what-is-sudo-in-linux-5.png\",\"width\":500,\"height\":500,\"caption\":\"what is sudo in linux\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/what-is-sudo-in-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is Sudo in Linux [A Detailed Review]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/\",\"name\":\"LinuxSimply\",\"description\":\"All About Linux\",\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/linuxsimply.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\",\"name\":\"LinuxSimply\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/LinuxSimply-New-Logo-Without-Icon.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/LinuxSimply-New-Logo-Without-Icon.png\",\"width\":355,\"height\":48,\"caption\":\"LinuxSimply\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/b54259fce1dc6e35d375984aff173ff0\",\"name\":\"Walid Al Asad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Walid-Al-Asad-II-96x96.png\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Walid-Al-Asad-II-96x96.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Walid-Al-Asad-II-96x96.png\",\"caption\":\"Walid Al Asad\"},\"description\":\"Hello Everyone! I am Walid Al Asad. Currently, I am working at a tech company named Softeko as a Linux Content Developer Executive. I live in Dhaka, Bangladesh. I have completed my BSc. in Mechanical Engineering from Bangladesh University of Engineering and Technology (BUET). You can find me on LinkedIn, and ResearchGate. Read Full Bio\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/walid.alasad.5\",\"https:\\\/\\\/www.instagram.com\\\/alasadwalid\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/walid-al-asad\\\/\"],\"url\":\"https:\\\/\\\/linuxsimply.com\\\/author\\\/walid\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is Sudo in Linux [A Detailed Review]","description":"Linux allows a user to execute a command with elevated privileges and the command used for that purpose is sudo. This is what sudo in Linux.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"What is Sudo in Linux [A Detailed Review]","og_description":"Linux allows a user to execute a command with elevated privileges and the command used for that purpose is sudo. This is what sudo in Linux.","og_url":"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/","og_site_name":"LinuxSimply","article_author":"https:\/\/www.facebook.com\/walid.alasad.5","article_published_time":"2023-02-26T06:28:54+00:00","article_modified_time":"2024-01-14T02:36:49+00:00","og_image":[{"width":500,"height":500,"url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-5.png","type":"image\/png"}],"author":"Walid Al Asad","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Walid Al Asad","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#article","isPartOf":{"@id":"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/"},"author":{"name":"Walid Al Asad","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/b54259fce1dc6e35d375984aff173ff0"},"headline":"What is Sudo in Linux [A Detailed Review]","datePublished":"2023-02-26T06:28:54+00:00","dateModified":"2024-01-14T02:36:49+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/"},"wordCount":1449,"commentCount":0,"publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"image":{"@id":"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-5.png","keywords":["system administration"],"articleSection":["Linux Glossary"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/","url":"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/","name":"What is Sudo in Linux [A Detailed Review]","isPartOf":{"@id":"https:\/\/linuxsimply.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#primaryimage"},"image":{"@id":"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-5.png","datePublished":"2023-02-26T06:28:54+00:00","dateModified":"2024-01-14T02:36:49+00:00","description":"Linux allows a user to execute a command with elevated privileges and the command used for that purpose is sudo. This is what sudo in Linux.","breadcrumb":{"@id":"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#primaryimage","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-5.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/02\/what-is-sudo-in-linux-5.png","width":500,"height":500,"caption":"what is sudo in linux"},{"@type":"BreadcrumbList","@id":"https:\/\/linuxsimply.com\/what-is-sudo-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxsimply.com\/"},{"@type":"ListItem","position":2,"name":"What is Sudo in Linux [A Detailed Review]"}]},{"@type":"WebSite","@id":"https:\/\/linuxsimply.com\/#website","url":"https:\/\/linuxsimply.com\/","name":"LinuxSimply","description":"All About Linux","publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxsimply.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/linuxsimply.com\/#organization","name":"LinuxSimply","url":"https:\/\/linuxsimply.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/#\/schema\/logo\/image\/","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/LinuxSimply-New-Logo-Without-Icon.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/LinuxSimply-New-Logo-Without-Icon.png","width":355,"height":48,"caption":"LinuxSimply"},"image":{"@id":"https:\/\/linuxsimply.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/b54259fce1dc6e35d375984aff173ff0","name":"Walid Al Asad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Walid-Al-Asad-II-96x96.png","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Walid-Al-Asad-II-96x96.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Walid-Al-Asad-II-96x96.png","caption":"Walid Al Asad"},"description":"Hello Everyone! I am Walid Al Asad. Currently, I am working at a tech company named Softeko as a Linux Content Developer Executive. I live in Dhaka, Bangladesh. I have completed my BSc. in Mechanical Engineering from Bangladesh University of Engineering and Technology (BUET). You can find me on LinkedIn, and ResearchGate. Read Full Bio","sameAs":["https:\/\/www.facebook.com\/walid.alasad.5","https:\/\/www.instagram.com\/alasadwalid\/","https:\/\/www.linkedin.com\/in\/walid-al-asad\/"],"url":"https:\/\/linuxsimply.com\/author\/walid\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/6663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/users\/314893"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/comments?post=6663"}],"version-history":[{"count":0,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/6663\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media\/6668"}],"wp:attachment":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media?parent=6663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/categories?post=6663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/tags?post=6663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}