Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • Compare SurveyMonkey with Google Forms Software Reviews
  • How To Insert CSV or TSV Into An Excel Worksheet Office Tips
  • 8 Troubleshooting Tips For a Slow Ethernet Connection Help Desk
  • Best weight watchers points calculator 2018 2020

    Best weight watchers points calculator 2018 2020. 1 - LiCB CR2032 3V Lithium Battery(10-Pack) Top Reviews I was skeptic

  • How To Run Steam As Admin And Why You May Need To Gaming
  • Is game mode good or bad windows 11 Gaming
  • How to Find the Best Deals Online and Save Money While Shopping

    Everyone wants more for less. A quick Google search of the best coupon sites will yield hundreds of results, as well as carefully curated “best”

  • Best canon calculator 2020

    Best canon calculator 2020. 1 - Canon MP25DV-3 - Two-Color Ribbon Printing Calculator Top Reviews Love it. Don’t know of

5 Windows Alternatives to the Linux sudo Command

Posted on October 9, 2020 By blog_786 No Comments on 5 Windows Alternatives to the Linux sudo Command

If you’ve ever used Linux, or know someone who uses Linux, then you’ve probably heard of the sudo command. The command is an essential component for almost every Linux distribution, and it allows you to run a command as a different user, primarily the root user. On some Linux distributions, you can log in as root using the su command, but this is considered very risky and no one ever does.

In fact, it is so dangerous that it is disabled by default on Linux distributions like Ubuntu. Instead, you must use the sudo command if you want to run the command as root. So what about Windows? Unfortunately, most people log on to Windows as administrators, which is the same as root on Linux. However, Microsoft has tried to mitigate the harmful effects of logging in as an administrator by enabling User Account Control or UAC.

Thus, even if the user has administrator rights, applications running under this account will not inherit these privileges unless manually allowed by the user. This helps prevent malware and spyware infections for a Windows user who is logged on as an administrator.

So if Linux users have a sudo command, what does a Windows user have? Are there alternatives that Windows users can use to execute commands with elevated privileges? Is there a sudo command for Windows? In this article, I will introduce five alternatives to the sudo command for Windows users.

Note. Some of these tools are already outdated, so they may or may not work with the latest versions of Windows.

Windows Runas command

Windows has a runas command, which is the direct Linux counterpart to sudo. Using the runas command, you can run a script, program, or command as another user or as an administrator. The complete syntax for the runas command is:

– / runas [{/ profile | / noprofile}] [/ env] [/ netonly] [/ smartcard] [/ showtrustlevels] [/ trustlevel] / user: UserAccountName program

If you want to open the administrative command prompt, you can enter the following:

runas / noprofile / user: Administrator cmd

5 Windows Alternatives to the Linux sudo Command

/ noprofile does not load the current user profile. You can remove this if you need access to user environment variables. If you want to open a text file with Notepad with administrator rights, you can use this command:

runas / user: Administrator “notepad my_file.txt”

You can check the Technet page at runas for more information on how to use it.

Note that when using the runas command, if you install the program or make changes to settings, etc., the changes will be made to the user account where you run the command. For example, suppose you have user X, who is a regular user, and user Y, who is an administrator. If you sign in to X and then run using your administrator credentials, the changes will be made to the administrator settings, not user X.

Therefore, if you install the application by right-clicking the EXE file and choosing Run as Administrator, it will be installed in the built-in administrator profile, not the one you are logged into. If you want truly elevated privileges like sudo without profile issues, check out the next alternative below.

Sudo for Windows – Sourceforge

Sudo for Windows is a free program that you can install that gives you the same capabilities as the Linux sudo command for Windows. The only difference is that Sudo for Windows “preserves the user profile and ownership of the created objects” as stated by the developer. This is really handy if you like to use elevated permissions to install apps or make changes to custom locations like My Documents, etc.

It will give you administrator rights, but it will save all changes to your current profile, not to the account you use to run the command. The program requires .NET version 2.0, which you cannot download separately. To get version 2.0, you need to install .NET Framework 3.5, which includes 2.0.

After installing Sudo for Windows, you need to add the user accounts that you allow elevated privileges to a specific group created by Sudoers. Right-click “My Computer” or “This PC” and select “Manage”. Then expand Users and Groups and click Groups. You should see one called Sudoers.

5 Windows Alternatives to the Linux sudo Command

Double click Sudoers and click the Add button.

5 Windows Alternatives to the Linux sudo Command

In the next dialog box, click the Advanced button and then click Find Now. It will list all users and groups on the system. Double click the user you want to add.

5 Windows Alternatives to the Linux sudo Command

Repeat this step for as many users as you want to add. Then click OK and you should see the attendees listed in the attendee list shown above. Click OK and you should now be able to use the sudo GUI and command. If you right-click the program, you will see the Sudo option.

You can also open a command prompt and enter sudo to run the command with elevated permissions.

5 Windows Alternatives to the Linux sudo Command

Overall, it is pretty good and works very well. Note, however, that this particular program is indeed useful for launch programs or processes by right-clicking or via the command line, but it is not intended to launch command line applications. For example, if you want to run sudo mkdir “c: Program Files new”, it will not work with Sudo for Windows There is another program for this functionality with the same name, but from a different developer. Read below.

Sudo for Windows – Luke Sampson

Another developer wrote another Sudo for Windows that also allows you to run applications from the command line. So let’s go back to the example about creating a new folder in C: Program Files. This is not possible by default.

5 Windows Alternatives to the Linux sudo Command

I am using PowerShell above, but you will get the same error on the command line as well. However, after installing Sudo for Windows, just add the word sudo to the beginning of the command and it will work without error!

To install it, you need to open PowerShell and then enter the following commands in order:

iex (new-object net.webclient) .downloadstring (‘https://get.scoop.sh’) set-executionpolicy unrestricted -s cu -f scoop install sudo

If everything is working fine, you should see the following output in PowerShell after each command:

5 Windows Alternatives to the Linux sudo Command

This is it! You can now start typing commands and add sudo in front. The only annoying thing about this program is that the UAC window still appears and you click Yes for it to work. Even with this slight annoyance, the benefit is worth it.

upload

Elevate is a program that works with UAC and works differently from sudo. With Elevate, it will change the executing user to admin as the runas command does. However, this is useful for working on the command line or batch files.

5 Windows Alternatives to the Linux sudo Command

The main purpose of the promotion is not to bypass UAC, but to start the elevated process from a non-elevated shell, and then continue as usual even after the command has finished. Elevate is useful for scripting because you don’t have to worry about trying to write a script by right clicking and running Command Prompt as administrator.

Lifting PowerToys for Windows

For those of you with a lot of command line work or scripting and batch files, the Elevation PowerToys for Windows page has quite a few helpful tools and scripts.

5 Windows Alternatives to the Linux sudo Command

The elevation scripts were created to overcome the frustrating aspects of UAC when trying to elevate a program from the command line or when running scripts as an administrator.

Hopefully this is enough tools and programs to make you feel like you are actually using sudo on Windows. There is no perfect replacement for it, but there are quite a few suitable options. If you are using anything else to improve programs, commands or scripts on Windows, let us know in the comments. Enjoy!

–

Share this:

  • Twitter
  • Facebook
Tools Review Tags:upload

Post navigation

Previous Post: 5 Utilities for Changing DNS Servers in Windows Reviewed
Next Post: Fix Windows 10 App Opens Then Closes

Related Posts

  • The Best Places To Get VoIP Services To Work From Home Tools Review
  • Use GParted to Manage Disk Partitions in Windows Tools Review
  • Is Best iPhone Recovery Software – iMyFone Fixppo? Tools Review
  • 6 Best Sites to Download Movie Subtitles for Free Tools Review
  • Best Programs to Add New Functionality to Windows 10 Tools Review
  • The Best 4 Alternatives To Google Chromecast Tools Review

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • March 2021
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Categories

  • AI Tools & Guides
  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • islamic Books
  • Linux
  • Linux Tips
  • Mac OS X
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress
  • How to go Back to the old YouTube Layout (2013)
  • How to Bypass Chromecast DNS and Circumvent Geo Blocking
  • 5 Cool Websites to Find Good Movies and TV Shows on Netflix
  • SmartDNS vs VPN – What’s the Difference?
  • How to go Back to the old YouTube Layout (2017)
DMCA.com Protection Status

Recent Posts

  • This Simple Trick Lets You Play YouTube in the Background on iOS
  • How to Bypass Chromecast DNS and Circumvent Geo Blocking
  • 5 Cool Websites to Find Good Movies and TV Shows on Netflix
  • SmartDNS vs VPN “What’s the Difference?”
  • How to go Back to the old YouTube Layout (2013)

Recent Comments

  1. A Simple Trick to Get 50% Discount on Audible for Three Months on Private Browsing: What is it and What it is not
  2. 6 Best PayPal Alternatives (2017) on How to Save Money While Shopping Online in India
  3. Automatically Transcribe YouTube Video/Audio with Google Docs on 5 Best Team Management Apps (For Small and Large Teams)
  4. 6 Things You Need Know About Email Encryption on Delete All Emails from Gmail With Once Click
  5. Looking For YouTube Alternative? Try These 7 Video Sharing Sites on Ten Best YouTube Video Editing Software 2023
  • How do I fix chromecast source not supported? How-To
  • What Political Ideology Are You? 7 Websites to Test Yourself How-To
  • Evernote Desktop App: All the Features for Convenient Note Taking Tools Review
  • PlayStation Plus vs. Xbox Game Pass Gaming
  • How Much Paypal Charges Per Transaction in India How-To
  • When to Use Index-Match Instead of VLOOKUP in Excel Office Tips
  • How to Create a Windows 10 Guest Account Windows 10
  • How To Erase Your iPhone Or iPad Remotely Tutorials

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version