Skip to content

How To Blog

how to

  • Best sharp scientific calculator 2020

    Best sharp scientific calculator 2020

  • How to Go Live on Instagram From PC How-To
  • How to Fix an IP Address Conflict Computer Tips
  • best app to read books for free 2022 Smartphones
  • Best calculator large display and buttons 2020

    Best calculator large display and buttons 2020

  • The Best Free & Paid Remote Desktop Connection Managers For Windows Tools Review
  • Best ten key calculator 2020

    Best ten key calculator 2020

  • 8 Alternatives to Google Maps and When to Use Them Software Reviews

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!

–

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

  • Why You Shouldn’t Download CCleaner for Windows Anymore Tools Review
  • Best Free Team Chat Software for Windows 10 Tools Review
  • The 7 Browser Extensions That Every Chrome User Should Be Using Tools Review
  • Microsoft Teams Video Conference Guide 2021 Tools Review
  • Best Programs to Add New Functionality to Windows 10 Tools Review
  • Top 5 Alternatives to Schedule Windows Tasks Tools Review

Leave a Reply Cancel reply

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

  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • How-To
  • iOS
  • iPad
  • iPhone
  • Linux Tips
  • macOS
  • MS Office Tips
  • Networking
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • January 2023
  • December 2022
  • 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
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • 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

2021 Android ) Apple apps Best browser change Chrome Closing words Concluding remarks Download email Error Facebook From Google Image Internet Keyboard Mac make Movies Music online Packaging phone? Photos Print Shortcuts sites Switch Time Tips Tricks turn using Video Videos Watch What With Word Working? your YouTube

  • How to block spam on WhatsApp Smartphones
  • Best large calculator big buttons and display 2020 Calculator
  • The Basics Of Creating Your First YouTube Channel Google Software/Tips
  • Android GPS Not Working? Here’s How To Fix It Help Desk
  • iPhone External Storage: 4 Best Flash Drives For iPhone Hardware
  • How To Block Unauthorized App Store Purchases Under Your Account Tutorials
  • A Microsoft To Do Review: Why You Should Switch Right Now Software Reviews
  • How To Set Up a Conference Call How-To

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}
Go to mobile version