The Tech Edvocate

Top Menu

  • Advertisement
  • Apps
  • Home Page
  • Home Page Five (No Sidebar)
  • Home Page Four
  • Home Page Three
  • Home Page Two
  • Home Tech2
  • Icons [No Sidebar]
  • Left Sidbear Page
  • Lynch Educational Consulting
  • My Account
  • My Speaking Page
  • Newsletter Sign Up Confirmation
  • Newsletter Unsubscription
  • Our Brands
  • Page Example
  • Privacy Policy
  • Protected Content
  • Register
  • Request a Product Review
  • Shop
  • Shortcodes Examples
  • Signup
  • Start Here
    • Governance
    • Careers
    • Contact Us
  • Terms and Conditions
  • The Edvocate
  • The Tech Edvocate Product Guide
  • Topics
  • Write For Us
  • Advertise

Main Menu

  • Start Here
    • Our Brands
    • Governance
      • Lynch Educational Consulting, LLC.
      • Dr. Lynch’s Personal Website
      • Careers
    • Write For Us
    • The Tech Edvocate Product Guide
    • Contact Us
    • Books
    • Edupedia
    • Post a Job
    • The Edvocate Podcast
    • Terms and Conditions
    • Privacy Policy
  • Topics
    • Assistive Technology
    • Child Development Tech
    • Early Childhood & K-12 EdTech
    • EdTech Futures
    • EdTech News
    • EdTech Policy & Reform
    • EdTech Startups & Businesses
    • Higher Education EdTech
    • Online Learning & eLearning
    • Parent & Family Tech
    • Personalized Learning
    • Product Reviews
  • Advertise
  • Tech Edvocate Awards
  • The Edvocate
  • Pedagogue
  • School Ratings

logo

The Tech Edvocate

  • Start Here
    • Our Brands
    • Governance
      • Lynch Educational Consulting, LLC.
      • Dr. Lynch’s Personal Website
        • My Speaking Page
      • Careers
    • Write For Us
    • The Tech Edvocate Product Guide
    • Contact Us
    • Books
    • Edupedia
    • Post a Job
    • The Edvocate Podcast
    • Terms and Conditions
    • Privacy Policy
  • Topics
    • Assistive Technology
    • Child Development Tech
    • Early Childhood & K-12 EdTech
    • EdTech Futures
    • EdTech News
    • EdTech Policy & Reform
    • EdTech Startups & Businesses
    • Higher Education EdTech
    • Online Learning & eLearning
    • Parent & Family Tech
    • Personalized Learning
    • Product Reviews
  • Advertise
  • Tech Edvocate Awards
  • The Edvocate
  • Pedagogue
  • School Ratings
  • Tribit FlyBuds C3 Earbuds: Premium Features at a Budget-Friendly Price

  • Is AuraCam Pro’s Emotional AI a Privacy Nightmare or Security Breakthrough?

  • Unprecedented: N-able’s Global Shutdown After 30+ Zero-Days Revealed

  • The Urgent Truth: Your AI Tools for Financial Advisors Could Be a Compliance Nightmare

  • Unmasking the Troubling Truth About EU’s Digital Omnibus and Your Data

  • Outrageous: Your US Car Insurance 2026 Bill Is About to Explode – Here’s Why

  • Uncovering the Truth: Are AI Spending Concerns About to Tank Your Portfolio?

  • The Silent Revolution: How AI Property Valuation Is Quietly Reshaping Real Estate

  • The Astonishing Truth: Why Your Dream Car Is Now a $52,000 Illusion

  • Toxic Algorithms: Why Your Bank’s AI Could Cost You Everything

Digital & Mobile Technology
Home›Digital & Mobile Technology›How to Fix the “sudo: command not found” Error on Linux

How to Fix the “sudo: command not found” Error on Linux

By Matthew Lynch
August 5, 2023
0
Spread the love

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. When working with Linux, you may come across errors that need fixing to continue using this operating system optimally. One such issue is the “sudo: command not found” error. The sudo command is fundamental as it allows you to run administrative actions safely.

In this article, we’ll show you how to fix the “sudo: command not found” error on Linux.

What Causes the “sudo: command not found” Error?

The “sudo: command not found” error may occur due to several reasons, including:

  1. 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.
  2. 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. If you’re using a non-standard distribution, the PATH variable may not include the folder that contains the sudo command.
  3. The sudo command is not accessible: When the sudo binary is not executable, you’ll receive the “sudo: command not found” error.

Now that you understand what causes the error, let’s take a look at how to fix it.

Fixing the “sudo: command not found” Error1.

1.Install the sudo Package

If you’re unsure whether the sudo package is installed on your Linux distribution, you can install it by running the command below:

Debian/Ubuntu:

sudo apt-get install sudo

Fedora:

sudo dnf install sudo

CentOS/RHEL:

sudo yum install sudo

Once you’ve installed the sudo package, test it by running the command below:

sudo echo “Hello World”

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.

2.Add the sudo Folder to the PATH Variable

If the sudo command is not in the PATH variable, you’ll have to add the folder manually.

To check the PATH variable’s contents, run the command below:

echo $PATH

If the output doesn’t have the /usr/bin/sudo folder, add it to the PATH variable by modifying the /etc/environment file. Open the file in your preferred text editor and append the following line at the end of the file:

/usr/bin/sudo

Save and exit the file and reload it by running the command below:

source /etc/environment

Test the sudo command using the process shown above.

3.Fix Sudo Binary Permissions

Sometimes, the “sudo: command not found” error may occur due to incorrect permissions set on the sudo binary. To fix it, follow the steps below:

Step 1: Locate the sudo binary file by running the command below:

whereis sudo

The output should be similar to the one below:

sudo: /usr/bin/sudo /usr/lib/sudo /usr/share/man/man8/sudo.8.gz

Step 2: After locating the sudo binary file, check the file permissions by running the command below:

ls -lah /usr/bin/sudo

Step 3: If the output shows that the sudo binary file is not set to executable, you can fix the permissions by changing them using the chmod command. Run the command below:

sudo chmod 4755 /usr/bin/sudo

The above command changes the file’s permissions, allowing the system to execute it correctly.

Previous Article

How to Fix a Windows 10 Infinite ...

Next Article

Ways to Buy Bitcoin With PayPal

Matthew Lynch

Related articles More from author

  • Digital & Mobile Technology

    How to Create a PlayStation Network Account

    May 31, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    What Is Google Discover, and How Do I View It on My Phone?

    May 22, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    Last Chance to Reserve the Galaxy S24 From Samsung and Save Up to $1,020

    January 30, 2024
    By Matthew Lynch
  • Digital & Mobile Technology

    How to Set up an iPhone or iPod Touch for Kids

    June 9, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    What Is the Reader View in Safari and How Do You Use It?

    September 7, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    What is Hybrid IT?

    May 22, 2023
    By Matthew Lynch

Search

Login & Registration

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Newsletter

Signup for The Tech Edvocate Newsletter and have the latest in EdTech news and opinion delivered to your email address!

About Us

Since technology is not going anywhere and does more good than harm, adapting is the best course of action. That is where The Tech Edvocate comes in. We plan to cover the PreK-12 and Higher Education EdTech sectors and provide our readers with the latest news and opinion on the subject. From time to time, I will invite other voices to weigh in on important issues in EdTech. We hope to provide a well-rounded, multi-faceted look at the past, present, the future of EdTech in the US and internationally.

We started this journey back in June 2016, and we plan to continue it for many more years to come. I hope that you will join us in this discussion of the past, present and future of EdTech and lend your own insight to the issues that are discussed.

Newsletter

Signup for The Tech Edvocate Newsletter and have the latest in EdTech news and opinion delivered to your email address!

Contact Us

The Tech Edvocate
910 Goddin Street
Richmond, VA 23231
(601) 630-5238
[email protected]

Copyright © 2026 Matthew Lynch. All rights reserved.