Windows SUDO Now Available in 24H2 - Not Windows 12 - New Features!

Поділитися
Вставка
  • Опубліковано 24 кві 2024
  • Dave introduces sudo for Windows, which allows you to run administrative commands from the command like without running as an escalated user! For my book on life on the Spectrum: amzn.to/49sCbbJ
    Any requests to contact me on Telegram, etc, are scams...
    Follow me on Facebook at davepl for daily shenanigans!
    Follow me on Twitter at @davepl1968
  • Наука та технологія

КОМЕНТАРІ • 1,1 тис.

  • @JockelGaming
    @JockelGaming Місяць тому +460

    Finally not starting new terminal just for admin privileges!!!

    • @RobertGrimm
      @RobertGrimm Місяць тому +8

      I was wondering what the point was. Now that I've seen it in action, I'm sold. I've always preferred the way other systems do that to the Windows way. Now the Windows way is the same as everything else! Now I need to find a way to enable it through group policy.

    • @shallex5744
      @shallex5744 Місяць тому +11

      you had to do that in windows this whole time? jeez...

    • @ced2k
      @ced2k Місяць тому +6

      Or always run terminal as admin 😇

    • @CulturedThugPoster
      @CulturedThugPoster Місяць тому +6

      Pro tip .. right click Windows Start and you are presented with cmd admin option. Saying that .. Sudo in Winterm or Powershell is pretty cool and overdue.

    • @user-in2cs1vp6o
      @user-in2cs1vp6o Місяць тому +8

      ​@@ced2kNo do not always run commands as admin. Do you have any purpose for granting random shit administrator access into your literal SHELL?

  • @yobgodababua1862
    @yobgodababua1862 Місяць тому +313

    Welcome to the 1990s, Windows!
    Glad to have you aboard!

    • @TankEnMate
      @TankEnMate Місяць тому +20

      sudo has been around since 1980, su since 1971.

    • @TheGraemi
      @TheGraemi Місяць тому +3

      @@TankEnMate But probably not him. 😉

    • @TankEnMate
      @TankEnMate Місяць тому

      @@TheGraemi Which him? Dave?

    • @TheGraemi
      @TheGraemi Місяць тому

      @@TankEnMate yobgodababua1862

    • @littlebighumancom
      @littlebighumancom Місяць тому +11

      Can we now run "sudo turnOffTheseGdmnAdsinWindows11"?

  • @DavesGarage
    @DavesGarage  Місяць тому +241

    Wow the color balance on the webcam is pretty bad! At least you can tell a difference from my good camera :-)

    • @user-jz2fy3xz1e
      @user-jz2fy3xz1e Місяць тому +3

      Great video

    • @boyscout399
      @boyscout399 Місяць тому +12

      Some people get bent out of shape with stuff like that. To me, it's about the content and the teaching. I don't mind the sepia tones. Thanks Dave!

    • @_jaime.
      @_jaime. Місяць тому +3

      Isn't the whole video yellowish?

    • @SeanBZA
      @SeanBZA Місяць тому +2

      We are here for your great voice and knowledge, the colour shift, while not the best, is an acceptable compromise.

    • @frugalprepper
      @frugalprepper Місяць тому +1

      It's fine we don't look at the webcam anyway!

  • @DMPLAYER1000
    @DMPLAYER1000 Місяць тому +204

    Seems a decade late but it's cool that it's finally there

    • @overand
      @overand Місяць тому +38

      A decade is generous - we've needed this since Server 2008, at bare minimum.

    • @wombatillo
      @wombatillo Місяць тому +22

      @@overand Yeah, this is more like 20 years late to the party.

    • @johnarnold893
      @johnarnold893 Місяць тому +33

      @@wombatillo sudo has been around since 1980. In Linux the sudo command requires your password, seems like Windows forgot about that part. Whats the point of a user account if all you have to do is use sudo to elevate to superuser without a password?

    • @SeanSMST
      @SeanSMST Місяць тому

      @@johnarnold893 thats what windows is usually like, not asking for a password when the popup comes up. Come on man, windows has been doing this for well over a decade, probably 2

    • @Novascrub
      @Novascrub Місяць тому

      @@johnarnold893 It goes through UAC.

  • @anispinner
    @anispinner Місяць тому +62

    "Two thousand years later"

  • @fnizzelwhoop
    @fnizzelwhoop Місяць тому +16

    I've always throught that the reason we haven't seen a `sudo` for Windows is because there's a principle saying that a user token must only be created through authentication (with a few exceptions where this isn't actually possible). As much as I hated not having sudo on Windows, I kind of respected the principle from a security perspective.
    We've entered a new era.

    • @dcorbe
      @dcorbe Місяць тому +1

      The amount of plumbing from the command line version of sudo and the Windows API is actually kind of impressive here. NGL.

    • @TheWyleECoyote
      @TheWyleECoyote Місяць тому

      You can't be so stupid to believe that Windows was/is more secure can you? Windows starts you out at admin rights enabled all the time, Linux is and always has prevented super user, until the morons started showing up...
      The reason you've never seen 'sudo' in Windows is because it's not "Linux". Real power users know how to use 'su' and 'vi' everyone else is too stupid for me to acknowledge.

  • @craigyoung8008
    @craigyoung8008 Місяць тому +29

    That’s good to hear.
    To get around this Windows limitation, I wrote a short “sudo” script that would:
    - launch a new console with Admin privileges
    - redirect everything after the sudo call as a command to the new console, and the switch to close after executing
    - redirect output to a temporary file
    - then finally cat the file to the original console, so I could see the output of the redirected command
    Unfortunately it has some limitations, but does the job for simple admin commands.
    So I really look forward to using the new sudo feature.

    • @jeffwells641
      @jeffwells641 Місяць тому +6

      I did the same for Powershell. It was like, 60% as good as regular SUDO. It's amazing that this is finally coming to Windows, but it's even more amazing that this basic, logical feature has been absent for so long.

    • @citybeef9873
      @citybeef9873 Місяць тому

      why not write a powershell script with all the commands you intend to run, and run that script as sudo?

    • @jeffwells641
      @jeffwells641 Місяць тому +2

      @@citybeef9873 That's literally what I did, except there is no sudo prior to this update

    • @TonyPombo
      @TonyPombo Місяць тому +1

      The Windows equivalent, "runas", was added back in Windows 2000 and works great. Maybe consider using that (and the corresponding runas verb) instead of the complex thing you wrote?

    • @thedave1771
      @thedave1771 Місяць тому

      @@TonyPomborunas has a bunch of limitations itself, it doesn’t solve all problems. But it certainly does work with some.

  • @DanielMReck
    @DanielMReck Місяць тому +25

    No mouse required to start an elevated application: Tap Start key, type enough letters to bring the app to the top of the search, press CTRL-SHIFT-ENTER, fill credentials in EAC, and boom.
    Sudo in Terminal is great and long overdue. I'll definitely try it next time I fire up my locked down W11 VM that I only use because Adobe hates Linux.

    • @soundspark
      @soundspark Місяць тому +2

      Press Windows key, type code, press Ctrl+Shift+Enter, hard to break that habit.

    • @tzgaming207
      @tzgaming207 Місяць тому +5

      Ctrl-Shift-Enter to run as admin, yet another thing where I just now learn about it & wonder "how long has that been there??" Thank you! 😄

    • @DanielMReck
      @DanielMReck Місяць тому +2

      @@tzgaming207 You are most welcome! Happy elevating!

    • @t4nk3d402
      @t4nk3d402 Місяць тому +1

      this is awesome will save some time for sure

    • @1slotmech
      @1slotmech Місяць тому

      Most apps that don't want to expose their proprietary code won't port their Windows apps to Linux.

  • @vitalychernobyl6137
    @vitalychernobyl6137 Місяць тому +58

    Dave programmed it personally after shooting a round of golf with Gates and Ballmer. They were having some cold ones when Dave sketched out this program on two cocktail napkins -one in assembly for Gates and he, the second in crayon for Ballmer- and Gates said it was so brilliant they will ship it Spring ‘95. Well… the problem was Balmer didn’t understand it and it made him too sweaty, so it wasn’t until now that MS has unburied Dave’s masterpiece, inexplicably dated 2024. Congrats Dave! 🎉

    • @Dirtyharry70585
      @Dirtyharry70585 Місяць тому +2

      No, Microsoft just needed another excuse to raise prices for their bloated software

    • @UncleKennysPlace
      @UncleKennysPlace Місяць тому

      @@Dirtyharry70585 Bloated, for sure. But it's cheaper now, especially in adjusted dollars, to have Office programs on several PCs than it was in the past.
      But bloated _and with certain decades-old bugs not fixed yet,_ yeah.

    • @Milosz_Ostrow
      @Milosz_Ostrow Місяць тому +7

      I know you're joking, but it isn't too far from the truth. Prior to the release of Windows 95 there were dozens, possibly hundreds of beta-testers who were asked to provide feedback on any problems they found in the new operating system. One such tester, David A. Karp, submitted dozens of items and was annoyed to find that NONE of the problems had been fixed in the released system. He wrote a book about it, "Windows Annoyances", published by O'Reilly in 1997.

    • @jacoblf
      @jacoblf Місяць тому

      LoL!

  • @cho4d
    @cho4d Місяць тому +47

    awesome. i hope they continue taking inspiration from linux/unix where it is appropriate. sudo is such a core part of how i administer systems and it's always a pain when i have to right click-> run as admin on powershell

    • @o0Donuts0o
      @o0Donuts0o Місяць тому +6

      Not sure if you know this or not but you can Ctrl+Shift+Enter to run as admin.

    • @leetucker9938
      @leetucker9938 Місяць тому +9

      windows takes inspiration from everything , copies it , makes it 10 times slower with bugs and charges for the garbage ware

    • @a740g
      @a740g Місяць тому +2

      @@leetucker9938 Yet, for some reason the entire world keeps using Windows. I wonder why.

    • @JoriDiculous
      @JoriDiculous Місяць тому

      MS-DOS exist(ed) because gates and pal hacked Unix.

    • @jimwilley3539
      @jimwilley3539 Місяць тому +1

      ​@@JoriDiculous you know you can just Google to find correct information 😂

  • @timeimp
    @timeimp Місяць тому +152

    I think Hell has frozen over. We got sudo on Windows.
    It's a testament to Window's design and architecture - thanks for showing us this Dave!

    • @thecriticizedgamer8508
      @thecriticizedgamer8508 Місяць тому +28

      Shitty architecture*

    • @mschr2880
      @mschr2880 Місяць тому +11

      Testament? Didn't you mean coffin nail?

    • @logixthedev
      @logixthedev Місяць тому +33

      No, it's a testament to unix' design and architecture. Microsoft only copied the idea, in their ever-futile attempts to try to become more like Linux, because they know it's better but don't want to admit it. Just thinking about what horrible code loopholes they've created to get this up and running scares me, and I'm still hung up on "ERROR_SUCCESS. Error: The operation completed successfully"!

    • @zaremol2779
      @zaremol2779 Місяць тому +18

      @@thecriticizedgamer8508 an OS that is capable of running software from decades ago is far from a shitty architecture, Linux is barely if at all able to do that and MacOS has that ability deliberately removed over time.

    • @soundspark
      @soundspark Місяць тому

      @@thecriticizedgamer8508 Hence why you must authenticate with every call to sudo.

  • @sergiomartin8935
    @sergiomartin8935 Місяць тому +37

    30 Years way to late

    • @ArthurTheEpicGuy
      @ArthurTheEpicGuy Місяць тому +3

      And you still have to manually enable it on a several hundred dollar operating system.

    • @RobertMcGovernTarasis
      @RobertMcGovernTarasis 25 днів тому

      And requires a dialog grr

  • @theunseen010
    @theunseen010 Місяць тому +27

    That sure is shorter than runas and a new prompt. I love it - about time

    • @jimiscott
      @jimiscott Місяць тому +6

      Yes, but people complaining about not having a sudo like function are wrong since runas (however clunky) has been around for Win2k (I think).

    • @jovetj
      @jovetj Місяць тому +1

      @@jimiscott You're right.

    • @mattrogers6646
      @mattrogers6646 Місяць тому

      I have been using a power tool called SuperUser that invokes a new cmd terminal with SYSTEM privileges. Great for file access issues like files that cannot be deleted, and works for Win10.

    • @katrinabryce
      @katrinabryce Місяць тому

      @@jimiscott I can confirm it was around in 2000. I never used NT4, so can’t confirm if it was there.

  • @johnburr9463
    @johnburr9463 Місяць тому +17

    Finally! So glad they implemented this.

    • @TonyPombo
      @TonyPombo Місяць тому

      They implemented it in Windows 2000. Look up "runas"

  • @spaphy
    @spaphy Місяць тому

    Thanks Dave! Love the videos. Not related to this video in particular but just in general - Glad we still have a sane face in the industry as always.

  • @slycordinator
    @slycordinator Місяць тому +21

    Even though it's the most common use case, sudo in Unix isn't for running as administrator, but for running a command as any user of your choosing.
    The su is short for "switch user". Both the su and sudo commands have a "-u" option for choosing the user to switch to, with the administrator as the default if no option is given.

    • @weseehowcommiegoogleis3770
      @weseehowcommiegoogleis3770 Місяць тому

      You are talking to the Brain dead masses.

    • @bryanteger
      @bryanteger Місяць тому +10

      "sudo" means "superuser do".

    • @JJFX-
      @JJFX- Місяць тому

      sudo these days typically stands for "substitute user do" because as you pointed out, it can allow you run commands as another user using your password without opening that user's shell. "Superuser do" is how it was described back in the day and still true but has as evolved beyond that.
      While also described as "su do", it functions very differently than the classic "switch user" su command.

    • @marcvanh
      @marcvanh Місяць тому +7

      You’re thinking of the command su on its own. sudo is “super user do…”. And technically is pronounced su-doo

    • @slycordinator
      @slycordinator Місяць тому

      ​@@marcvanh "You’re thinking of the command su on its own."
      No, I'm not. Both programs work the same in this regard
      sudo and su both accept a "-u username" option for specifying which user you wish to switch to, with the default being root.

  • @DeerJerky
    @DeerJerky Місяць тому +3

    I love how they finally implement this after I've been struggling with opening a new prompt for admin for almost 10 years now - and only just a couple of weeks ago decided to search up how to add custom commands to powershell and add a sort of "sudo" myself, lol.

    • @DeerJerky
      @DeerJerky Місяць тому

      Friendly reminder that any Daves in this section that DO NOT have the gray highlight around the username and/or mention anything about telegram are fake scams

    • @TonyPombo
      @TonyPombo Місяць тому

      The Windows equivalent, "runas", was added in Windows 2000 and works great. After playing with sudo, I honestly don't know why MS bothered adding it. Sudo seems to do the same thing, with less features and options.
      Also, consider that holding ctrl+shift while clicking an icon will launch as admin.

  • @coldlyanalytical1351
    @coldlyanalytical1351 Місяць тому +100

    UNIX/LINUX sudo was released in 1980.
    It has taken Microsoft only 43 years to catch up.

    • @soundspark
      @soundspark Місяць тому +7

      Linux has only existed since 19931 however.

    • @wildexploit
      @wildexploit Місяць тому +5

      @G5STU You're just wrong.

    • @rikschaaf
      @rikschaaf Місяць тому +7

      @@G5STU Steamdeck users beg to differ

    • @JoriDiculous
      @JoriDiculous Місяць тому +2

      MS-DOS excited before Linux. 🤦‍♂

    • @user-rv2ce5sz2w
      @user-rv2ce5sz2w Місяць тому +1

      they are quick and are known for their good products and choices along the way

  • @amenditman
    @amenditman Місяць тому +1

    About damn time! This will save a lot of frustrations when working on client's Windows systems.

  • @__--JY-Moe--__
    @__--JY-Moe--__ Місяць тому

    thanks Dave! always great education from u!!

  • @jordancobb509
    @jordancobb509 Місяць тому +11

    I'm pretty sure I know what the next Windows vulnerability alert is going to be.....

    • @codecaine
      @codecaine Місяць тому

      yeah no prompt for password lol

    • @kyoudaiken
      @kyoudaiken Місяць тому +7

      @@codecaine Shows that you have no idea how Windows works. It's a setting. You can set up for UAC to require the password, pin or hello auth each time.

    • @richardcarpenter6167
      @richardcarpenter6167 Місяць тому +3

      @@kyoudaiken and you do not seem to understand how Window works either. If I drop a malicious file with the name of the command you are trying to run into the current folder. Windows is going to elevate that program instead of the one you wanted to execute and you are mine. That is how many admins get hacked. That's why opening an admin elevated command prompt always opens in a known good environment.

    • @looks-suspicious
      @looks-suspicious Місяць тому

      @@richardcarpenter6167 Have you actually tried this? I would hope that sudo ignores the current directory, just like Powershell does? But either way, you still get information about the file's signature in the UAC dialog, so your malicious file would have to be signed by the right publisher to do this. (Yes, I know, most people ignore any security information presented to them and just click yes instantly.)

    • @qboy2terafirma
      @qboy2terafirma Місяць тому +4

      Already out there. A quick search uncovers the insane security holes this creates.

  • @t3hp0larbear
    @t3hp0larbear Місяць тому +13

    Semantics hang-up: "sudo" is supposed to be short for -"Switch User and DO"- "substitute user, do" and can let you run commands as any user on the system, provided your account is on the sudoers list. Here it just elevates the command following it. Which, well, understandable, since 99% of the time people use sudo to act as the root user.
    EDIT: I double-checked and it was in fact originally "superuser do". But the manpages for the su command say su is short for "substitute user" so really with how sudo works nowadays the correct meaning is "substitute user, do".

    • @kyoudaiken
      @kyoudaiken Місяць тому

      Switching permanently to root is not a good idea and is also not encouraged on Linux. You are supposed to only use sudo when it's absolutely necessary. sudo su and stuff is not recommended, unless you are setting up your installation and need to do a lot of things with root. But after that's done, the usage of sudo should be rare and only if you want to install updates.

    • @t3hp0larbear
      @t3hp0larbear Місяць тому +2

      @@kyoudaiken I'm... not certain how that's relevant? I'm not advocating for switching to root with any permanence whatsoever, I'm pointing out how this Windowsified sudo seems to simply elevate a command, as opposed to Linux's sudo which runs commands as other users (root by default if no user is specified), and acknowledging why that is.

    • @soundspark
      @soundspark Місяць тому +4

      Windows has different security behaviors than UNIX and UNIX-like OSes.
      In a sense Administrators since Vista are treated via UAC as sudoers.
      If you try to elevate on a limited user account you must provide the credentials of an account authorized to get admin privileges.

    • @Leonhart_93
      @Leonhart_93 Місяць тому +4

      Is it not "superuser do"? As it certainly doesn't actually switch any user.

    • @jacnoc98
      @jacnoc98 Місяць тому

      Thanks! I was wondering what that name meant.

  • @sunrunnernge560
    @sunrunnernge560 Місяць тому

    Big like! Wonderful as always. Love the wallpaper btw!

  • @wideninghorizons474
    @wideninghorizons474 Місяць тому

    I got excited to learn that you were one of the coders of early windows operating system.

  • @haplopeart
    @haplopeart Місяць тому +22

    It’s great that hey added it except it’s not done, and they screwed it up.
    1. Like *nix it should allow the subsequent commands with a Sudo to not prompt again
    2. It doesn’t work with powershell commands

    • @soundspark
      @soundspark Місяць тому +1

      Perhaps sudo could have a persistent process that caches the authentication for a limited time for the PID that first authenticates it, and relinquishes if either it times out or the calling process terminates (so another process can't recycle the PID and have privilege).

    • @supermaster2012
      @supermaster2012 Місяць тому +3

      Power shell already has a runas flag to the start-process cmdlet

    • @haplopeart
      @haplopeart Місяць тому +3

      @@supermaster2012 I know this, but "sudo" should be an all encompassing solution that works no different from what a *nix user is used to if they are going to bother to implement it in Windows.

    • @supermaster2012
      @supermaster2012 Місяць тому +1

      @@soundspark won't work, this whole thing works by escalating a child of the parent token via UAC. For technical reasons, the token cannot be reused by another PID, that's called "Token Impersonation" and it's a huge vulnerability.
      You can check this by using System Informer to inspect the SID of the parent and child processes.

    • @TankEnMate
      @TankEnMate Місяць тому +5

      The reason it doesn't work with powershell is because neither command.exe nor powershell.exe are shells; Windows has no concept of a shell program (for example you can't run command.exe or powershell.exe via a serial connection or a raw stream socket). A tty is a nicety for a shell, but not a strict requirement.

  • @dasmouse2557
    @dasmouse2557 Місяць тому +8

    Yaaay! Finally!
    what happens if you type sudo cmd ? do you get a root shell?

    • @blairmurri8741
      @blairmurri8741 Місяць тому

      On Linux what happens if you type sudo bash ?
      Same concept. Same effect.

    • @jovetj
      @jovetj Місяць тому

      No, for that you enter: *psexec -i -s cmd.exe*
      😉

    • @catfan5618
      @catfan5618 Місяць тому

      @@blairmurri8741Bold to assume that MS ports every Unix/Linux utility to Windows and makes it work identical to the original one. Just like typing ls is just executing Get-ChildItem and does not take parameters like -h for human readable even though it seems like it should.

    • @blairmurri8741
      @blairmurri8741 Місяць тому

      @@catfan5618 I didn't say they ported any particular tool with identical semantics. I apologize if my response implies what I didn't state. In my mind I simply pointed out that the particular tool implements the same concept (i.e. >80% use case) and as a result, the same effect will be the result.

  • @BurritoVampire
    @BurritoVampire Місяць тому +1

    Some jean-yes out there years ago made a block of code you could throw into your batch script that will essentially do this. It has never failed me in the 10 or so years I've been using it in my scripts. Nice to see that 30 lines of complete hieroglyphs can be replaced with 4 letters. Love it.

  • @ET_AYY_LMAO
    @ET_AYY_LMAO Місяць тому

    NICE! I actually had a home brew sudo command in cmd on windows for many years, but it always envoked the UAC, still better than having to open a terminal with administrator privs. It seems like microsoft copies every personal change i make to windows, even the quake style console is built in these days :D

  • @Ilix42
    @Ilix42 Місяць тому +4

    I learned about sudo when Apple moved to OSX and it became available to me.
    I have missed being able to force the OS to do things I wanted it to since moving to Windows back in the XP days.
    EDIT: Actually, I think my first Windows system that I owned was on Windows 7, since it had DX11 support.

    • @shadowopsairman1583
      @shadowopsairman1583 Місяць тому +1

      95, 98SE, ME, 2000, XP, 7 for me. w10, 11 are abysmal with the GUI along with telemetry.

    • @Ilix42
      @Ilix42 Місяць тому

      @@shadowopsairman1583 I always had Apple computers at school and Macs at home, until high school (where they had Windows systems), so all my non-Apple experience prior to that was at friends’ houses. I never understood how they remembered all the commands they needed to run their games, but I was also young and had no practice with it myself. :P

    • @eekee6034
      @eekee6034 Місяць тому

      @@shadowopsairman1583 I sometimes wish I could use those versions of Windows, but the classic and aero styles hurt my concentration just by being there on the screen. I used 7 for a few months; set to classic style with the toolkit background in a much lighter shade, but I'm much more comfortable in 10. It's some kind of disability; a relatively minor one but inescapable. I sometimes joke that I invented the Windows 10 style long before it existed. ;) I even tried as far back as Windows 3.1, though I didn't know what I needed back then and it wasn't really possible anyway.
      I'm not exactly happy about the telemetry, but I've seen manual relaying of system info to find bugs in a hobbyist-developed OS. I've got to admit a degree of automation is preferable. I just wish Microsoft were trustworthy, and Google too, but that's a fool's hope.

  • @ssgLunchbox
    @ssgLunchbox Місяць тому +4

    would be nice if they made making a local admin account easier in order to make this sudo command more necessary. I always install windows without networking and still have to do the trick in the setup to bypass needing a microsoft account. Then once that is done I create my user accounts without admin access

    • @rand0mtv660
      @rand0mtv660 Місяць тому

      You can use something like Rufus to create a Windows install usb stick from ISO and in Rufus options disable the need for Microsoft account. Then during installation you won't need any manual bypass.

  • @dennissdigitaldump8619
    @dennissdigitaldump8619 Місяць тому

    Dave is my favorite UA-cam person, why, well I worked at Intel and all the "good stuff" was all neuro-atypical people.
    You know who, I walked the acre paper & found why code crashed a transistor.
    Love you Dave!

  • @Chris-zj3xs
    @Chris-zj3xs 23 дні тому

    I am a Unix head, but I enjoy Windows too! Great vid Dave, keep the good work going!

  • @michaelrichardson8467
    @michaelrichardson8467 Місяць тому +5

    You can just hit cntl+sft+enter will launch anything from the Run command as admin. One of the most useful things added into windows in years imo

    • @robertlowther7442
      @robertlowther7442 Місяць тому +3

      That's true but then you are running the command line with full admin privileges, which is exactly what this is meant to stop you from doing. I love that shortcut but if I can get away without running as admin then that's a win.

    • @jovetj
      @jovetj Місяць тому

      @@robertlowther7442 I don't think it really matters. The whole point of "security" is to protect the user from himself. If you are too inept in front of a computer to misuse an Administrator Command Prompt, then you shouldn't be using one. There is not a giant pool of "viruses" waiting to attack your system through your open Admin Command Prompt, either.

    • @TonyPombo
      @TonyPombo Місяць тому

      Or use runas from the command line, like sudo.
      The Windows equivalent, "runas", was added in Windows 2000 and works great. After playing with sudo, I honestly don't know why MS bothered adding it. Sudo seems to do the same thing, with less features and options.

  • @infinite1der
    @infinite1der Місяць тому +5

    XKCD would like to know if "sudo make me a sandwich" works under Windows.

    • @kyoudaiken
      @kyoudaiken Місяць тому +1

      make: No target for "me". Stop.

    • @Mesa_Mike
      @Mesa_Mike Місяць тому +1

      @@kyoudaiken
      mikew@pollux:~$ make me a sandwich
      What? Make it yourself.
      mikew@pollux:~$ sudo make me a sandwich
      [sudo] password for mikew:
      Okay.

    • @supertuffy
      @supertuffy Місяць тому

      So funny I had to buy the t-shirt.

  • @wideninghorizons474
    @wideninghorizons474 Місяць тому

    The work you have done to build windows right from 90's is astonishing.

  • @wideninghorizons474
    @wideninghorizons474 Місяць тому

    Your videos are outstanding.

  • @d-tech3190
    @d-tech3190 Місяць тому +12

    Sorry but as far as I'm concerned this is a lame excuse for sudo. It's pretty much useless if you're not on an admin account since you'll have to type an admin password anyway. On Linux the true power of the sudo command is that you can configure it to allow non-root users to run specific commands - and only those commands - as root, which is not something that Windows supports.

    • @masterofx32
      @masterofx32 Місяць тому +1

      On linux this is a lame shortcut and can easily open security holes. Give us a valid use case you are seeing for this on Windows.

    • @gordug
      @gordug Місяць тому

      ​@masterofx32 developers with secondary admin accounts have to enter a monthly changing 16-character password for their admin account, doing this for each instance of an IDE they launch for the elevated service they're developing. Combined with elevated debugging tools, installing obfuscated builds for testing and co figuring Windows services for such applications. After entering that password 20-50 times a day you'll soon wish for a Linux like sudo experience. Elevated once, perform a few tasks and elevated again if the screen locks or the privilege isn't used ina a while.

    • @masterofx32
      @masterofx32 Місяць тому +1

      @@gordug ok, but allowing an IDE to just elevate to admin by default would obviously open a security hole. also is there a reason you have a secondary isolated account. if your standard account would automatically unlock a privileged account, that does not make sense security-wise. I would rather go for a passwordless experience to solve usability issues of such setups

    • @masterofx32
      @masterofx32 Місяць тому

      @T.el-e-gra.m-me-TheDavesGarage Shut up

    • @gordug
      @gordug Місяць тому

      @@masterofx32 I don't mean to allow it to elevate automatically, just give us a window of opportunity to perform elevated tasks without entering the password for each one. I use an elevated powershell window personally but others do not

  • @zonegamma8197
    @zonegamma8197 Місяць тому +7

    how many decades later we have finally this feature!!

    • @TonyPombo
      @TonyPombo Місяць тому

      The Windows equivalent, "runas", was added in Windows 2000 and works great. After playing with sudo, I honestly don't know why MS bothered adding it. Sudo seems to do the same thing, with less features and options.
      The "decades delay" might be because sudo isn't really needed.

  • @martyb3783
    @martyb3783 Місяць тому

    Great info! Thanks!

  • @Ice_Karma
    @Ice_Karma Місяць тому +2

    0:48 Forgetting about right-clicking the Start button or pressing Win+X and choosing "Command Prompt (Admin)" (or "Powershell (Admin)", depending) from the menu? 😻

  • @team_entropy
    @team_entropy Місяць тому +10

    seems like a reasonable update imo

  • @xelaxander
    @xelaxander Місяць тому +7

    1:15 Not sure if email addresses was leaked ;).

    • @volvo09
      @volvo09 Місяць тому

      He knows what he's doing

  • @iampeculiar
    @iampeculiar Місяць тому

    Dave, you are the messenger of good news :)

  • @opiniononion919
    @opiniononion919 Місяць тому +1

    I can't believe it took this long...
    But good to see that coming. Will make things just a little more fast and convenient when I'm at work.

    • @TonyPombo
      @TonyPombo Місяць тому

      The Windows equivalent, "runas", was added in Windows 2000 and works great. After playing with sudo, I honestly don't know why MS bothered adding it. Sudo seems to do the same thing, with less features and options.
      You might want to take a look at it

  • @TheDa6781
    @TheDa6781 Місяць тому +10

    1 down, 1 to go. SETUID.

    • @Ironpants57
      @Ironpants57 Місяць тому +1

      And 'sudo su'

    • @blairmurri8741
      @blairmurri8741 Місяць тому

      Setuid in Windows is essentially putting "requiresAdmin" in the binary's manifest, except with the security feature that the user must explicitly elevate the process invocation (rather than it being silent) because it's way too easy to pwn a Linux system when an inexperienced user and setuid collide.

    • @TonyPombo
      @TonyPombo Місяць тому

      This already existed. MS just make a cutdown version of the native tool and called it sudo. Lookup runas.exe and its verb

  • @pyajudeme9245
    @pyajudeme9245 Місяць тому +4

    Sudo, finally 🥰

  • @Onelovebaby
    @Onelovebaby Місяць тому

    Interesting.. Thanks Dave!

  • @wideninghorizons474
    @wideninghorizons474 Місяць тому

    I am constantly testing the working of various components of windows,right from time when I first learned about it.

  • @tato-chip7612
    @tato-chip7612 Місяць тому +5

    a lot of unix guys are not happy about the name.

    • @cho4d
      @cho4d Місяць тому +4

      that's silly...

    • @JoBot__
      @JoBot__ Місяць тому

      @@COIN_a Huh, I just checked on PowerShell and there is an ls command that replicates the dir command. I don't use Linux often enough to know more commands to try out though.
      Command Prompt does not include the Bash aliases though, which is to be expected.

    • @tato-chip7612
      @tato-chip7612 Місяць тому +1

      @@cho4d No it really is not considering it is a completely different codebase to sudo the official project.
      they just share a name.
      A lot of projects in the past have had to deal with bogus bugs because of this.

    • @tato-chip7612
      @tato-chip7612 Місяць тому

      @@COIN_a and I think that is bad

    • @itsentdev
      @itsentdev Місяць тому

      @@tato-chip7612 what project is going to deal with bugs because WINDOWS has sudo? this does not in fact affect bash scripts (it's on windows), and windows did not previously have sudo so there has been no breaking change.

  • @ralfderwerwurm6960
    @ralfderwerwurm6960 Місяць тому +3

    Security huh?! Rootkits camouflaged as anticheat enters the chat🤪

    • @eadweard.
      @eadweard. Місяць тому +5

      Not sure how this is relevant.

    • @ralfderwerwurm6960
      @ralfderwerwurm6960 Місяць тому

      @@eadweard. So security risks are not worth mentioning anymore, especially when the topic is a tool(os) that's used worldwide.(ok, China is ditching MSFT to be fair)

    • @Ravage64
      @Ravage64 Місяць тому

      Technically you can already do this already by invoking powershell (elevate a standard command prompt to an administrator prompt). I think sudo would be better as it would prompt each time an administrator command is ran instead of the blank check system we have now.

    • @itsentdev
      @itsentdev Місяць тому

      @@ralfderwerwurm6960 this is irrelevant to the discussion of sudo. linux has kernel modules too.

    • @eadweard.
      @eadweard. Місяць тому

      @@ralfderwerwurm6960 Well they're not worth mentioning in arbitrary and irrelevant contexts.

  • @bradwilliams1048
    @bradwilliams1048 Місяць тому

    I have been waiting for this feature for years!

    • @TonyPombo
      @TonyPombo Місяць тому

      The Windows equivalent, "runas", was added in Windows 2000 and works great. After playing with sudo, I honestly don't know why MS bothered adding it. Sudo seems to do the same thing, with less features and options.

  • @markward4532
    @markward4532 Місяць тому

    Thank you Dave

  • @spudhead169
    @spudhead169 Місяць тому +4

    Ahhh sudo, erroneously expanded to "super user do" from folk who had absolutely no clue that it is actually used to run something as another user, it just defaults to root when no username is specified. It really means "set user; do".

    • @storm9c1
      @storm9c1 Місяць тому +3

      Well older man pages did used to read "super user do". But the real WTF is people who pronounce it erroneously as "pseudo".

    • @spudhead169
      @spudhead169 Місяць тому

      @@storm9c1 Yeah, they really shouldn't let chumps write the man pages. I have big problems with pronunciations of acronyms in general. Sudo isn't too bad as it has the structure of an actual word, but things that are fundamentally unpronounceable like SQL being pronounced as "sequel" really bugs me. XML as "zammel" etc.. although that one is little better if it's XAML. I really wish the developers wouldn't make things like that official, it's child-like imo.

    • @logixthedev
      @logixthedev Місяць тому

      @@spudhead169 Child-like? What, like someone complaining about the pronunciation of an acronym that hasn't been given an official pronunciation, per se? Besides, Microsoft pronounce XAML in all their video sources on the topic as "zammel" because it's theirs to name. If you're going to be needlessly pedantic, you should be more concerned about the 'X' not being an 'E'.

    • @spudhead169
      @spudhead169 Місяць тому

      @@logixthedev Do you understand the difference between pedantry and opinion? I find it child-like, I have every right to feel any way I like about anything, and every right to voice such an opinion. What they want to name things is up to them, I don't have to like it. If you ask me, you're the one being pedantic.

    • @spudhead169
      @spudhead169 Місяць тому

      @T.el-e-gra.m-me-TheDavesGarage So is your painful torture but we don't always get what we want do we?

  • @WafflePanB
    @WafflePanB Місяць тому

    Did I see that Recommended section in the start menu? what is that teams? No they took sudo! nooooooooo! (Sarcasm) Great vid Dave!

  • @PhantomWorksStudios
    @PhantomWorksStudios Місяць тому

    So I was wondering, back in your nt days. How did you go about as well as process and tools, etc on developing applications for the newer os when those apis weren't in cooperated yet?
    I know there were windows betas from the previous release to the new release so we're you relying on the betas to build the applications and use the betals as a testing environment until everything was stable for the final releases?
    Example when working and programming from original nt over to windows 2000 or even from 2000 to xp?
    Did those applications that you worked on for the newer os did they have the newer apis in dll files specifically for the program to function before it was migrated over to thenew system dll and files for its final release?
    Thanks!!! Always been wondering about this!!! 😊

  • @TimeWiz
    @TimeWiz Місяць тому +1

    This is a great update for windows, also is the syntax on that machine rust based? The color scheme makes me think so, very cool if so

    • @Cohors1316
      @Cohors1316 Місяць тому

      I don’t see literally anything here that has anything to do with rust. Cmd is nearly 40 years old, and sudo is powershell.

  • @JasonSobell
    @JasonSobell Місяць тому

    We've had the `runas` command for a long time, which does the same thing. SUDO is a tidier command though, and no need for passwords etc. Nice!

  • @Vilvaran
    @Vilvaran Місяць тому +2

    What is funny is the arguments. The args for a typical windows terminal application all have a similar convention, "/A" and "/?" for example.
    Linux uses a similar convention, except a dash is used "-F" or two for most cases "--check". Typically we enter "--help", but many programs coded in the "/?" argument as well...
    It's funny to see this 'sudo' program using entirely linux arguments, anyone habitually entering a slash will be hating it lol!
    Also, there's another command called "su" which gives you a full admin prompt, so you don't need to keep using 'sudo' every time. From what I see, you still need an admin prompt to get around repeat sudoing...

  • @MinisterofDOOM
    @MinisterofDOOM Місяць тому

    This is such a huge improvement. I hate needing an always-elevated terminal session open.

    • @TonyPombo
      @TonyPombo Місяць тому

      The Windows equivalent, "runas", was added in Windows 2000 and works great. After playing with sudo, I honestly don't know why MS bothered adding it. Sudo seems to do the same thing, with less features and options.

    • @MinisterofDOOM
      @MinisterofDOOM Місяць тому

      runas has some limitations due to its scope that prevents it from accessing certain system variables as the elevated user. It's nice for simple single-program usage but tends to fall apart in scripting

  • @DavidWonn
    @DavidWonn Місяць тому +2

    Control+Alternate+Shift+clicking a shortcut already does this elevation, even on Win 7. And if you already launched anything the normal way, this works on the existing icon on the taskbar when you select the option to launch another instance.

    • @DBitRun
      @DBitRun Місяць тому +1

      For some reason holding Control+Shift does this elevation. Is the Alt (Alternate) key need in the shortcut you stated?

    • @DavidWonn
      @DavidWonn Місяць тому +1

      @@DBitRun Somehow I learned it with all 3 modifiers, so it is possible that the Alt key is superfluous in this case.

  • @marklharmon
    @marklharmon Місяць тому

    I'd forgotten that SUDO wasn't present in Windows 11. I've been using GSUDO for months now and it works great. All the same, it's great to have native support for this. I look forward to exploring other new features in this build.

  • @NexarPlays
    @NexarPlays Місяць тому +2

    Click start, type cmd, then hold ctrl+shift and press enter to run cmd instance as admin. But I'm glad we have a way to do it from a non admin instance now and not lose any work in that window.

    • @TonyPombo
      @TonyPombo Місяць тому

      The Windows equivalent, "runas", was added in Windows 2000 and works great. After playing with sudo, I honestly don't know why MS bothered adding it. Sudo seems to do the same thing, with less features and options.

  • @Alexifeu
    @Alexifeu Місяць тому +1

    I used linux mostly on virtual machines. This is really cool. I sometimes catch myself trying to use sudo in cmd xdd now it works lol.

  • @TheNewKill1212
    @TheNewKill1212 Місяць тому +1

    Hi Dave, just a side question about internals. How it's possible that Task Manager or Resource Monitor is able to monitor network traffic per application without requiring admin escalation? I saw that TCP/UDP stats require elevation (IPHLP API) and also kernel ETW provider... requires elevation.

  • @pikcube
    @pikcube Місяць тому

    Nice! I've been using gsudo for years, it'll be nice to use a version supported by the OS though

    • @TonyPombo
      @TonyPombo Місяць тому

      Consider the native command runas.exe and its verb

  • @allan1782
    @allan1782 Місяць тому +2

    I've been using gsudo with chocolatey for years and it does exactly the same thing. I figured at least Microsoft's version wasn't going to display the confirmation prompt.

  • @SupraSav
    @SupraSav Місяць тому +1

    Commenting because Dave is the man.

  • @gheffz
    @gheffz 28 днів тому

    Thank you!

  • @darrkstarg
    @darrkstarg Місяць тому

    This is great. I won't need gsudo much longer :-)

  • @ChozoSR388
    @ChozoSR388 27 днів тому

    Having said that, I'm really stoked that Windows is finally implementing things like sudo and, even though it was a bit ago, rsync.

  • @Leuel48Fan
    @Leuel48Fan Місяць тому +1

    That's cool, kinda wish they named it something else for differentiation and maybe symbol-linked "sudo". Maybe "adm" for admin. Win cmd has its own unique commands such as dir or del instead of ls or rm

    • @blairmurri8741
      @blairmurri8741 Місяць тому

      Powershell recognizes ls & rm and is a more powerful, Windows-centric shell than cmd could ever be.

    • @arahman56
      @arahman56 Місяць тому

      @@blairmurri8741 Even there, those are just aliases for the powershell commands.

    • @TonyPombo
      @TonyPombo Місяць тому

      Like 'runas' ?
      The Windows equivalent, "runas", was added in Windows 2000 and works great. After playing with sudo, I honestly don't know why MS bothered adding it. Sudo seems to do the same thing, with less features and options.

  • @TheExoduser
    @TheExoduser Місяць тому +2

    For anyone not aware of this. You don't need to necessarily right click to start anything as administrator from the start menu.
    If you hold hold Ctrl + Shift while you press enter or click on the tool it will also automatically run it as admin.
    As far as I'm aware that is a universal shortcut, so it will work on pretty much all executables, not only those run from the start menu.
    Of course the new sudo command makes stuff like this, mostly obsolete 😅

    • @palmberry5576
      @palmberry5576 Місяць тому +1

      if that second part is true, thats slightly terrifying and good to know lol

    • @TonyPombo
      @TonyPombo Місяць тому

      Also, runas and its verb eliminates the need for sudo. But, Linux users are a loud group who notoriously refuse to learn Windows commands. Regardless, more options for the users.

  • @69k_gold
    @69k_gold Місяць тому +1

    Hi Dave, can you make a video on Windows clipboard? Like how it can copy huge files and can even copy them over RDP into and from other Windows machines. I always thought of it as a fascinating concept

  • @core36
    @core36 Місяць тому

    I usually just opened the terminal, then right click the icon on the taskbar and there is a shortcut to launch a new window as administrator. But I then still have to copy over the path because I think it defaults to system32.
    Just having sudo is a nice upgrade indeed. There was something similar, also called sudo, on chocolatey. I occasionally installed and used that one, which is not available on winget. It is nice to not first have 2 windows package managers installed just to use this.

  • @TheGraemi
    @TheGraemi Місяць тому

    @Dave
    Do you evtl. know if they still use ShellExecuteExA with the verb runas for the implementation? Or did the change something more fundamentally?

  • @debemdeboas
    @debemdeboas Місяць тому

    this is AMAZING

  • @Therealanimalhouse
    @Therealanimalhouse Місяць тому

    Hello Dave, Question so, are you saying that if you are NOT a local administrator you can use sudo and run commands that need administrator privileges, or, do you need to be a local administrator and sudo let you run a commands without opening the program as administrator. It wasn't clear.

  • @dylantaylor490
    @dylantaylor490 Місяць тому

    It's about time!

  • @johnsimon8457
    @johnsimon8457 23 дні тому

    I always imagined sudo or UAC in windows as being the janitor pulling out a clothesline full of keys just to find the one that unlocks the control panel to the big scary fuse box

  • @rager1969
    @rager1969 Місяць тому +2

    I've been wondering why they didn't have this, so it's good to see that they finally added it.

    • @CathrineMacNiel
      @CathrineMacNiel Місяць тому

      Microsoft thought runas would suffice... they were mistaken.

    • @jovetj
      @jovetj Місяць тому

      @@CathrineMacNiel Why doesn't it?

    • @CathrineMacNiel
      @CathrineMacNiel Місяць тому

      @@jovetj have you seen the syntax of runas? Or used that command? Its absolutely horrible.

    • @TonyPombo
      @TonyPombo Місяць тому

      runas is *far* more feature rich than sudo, but also more complicated. I think the complexity of the command scares people.
      You could also just use the runas verb. It's easier.
      PowerShell example:
      start -verb runas notepad.exe

  • @jeisonsanchez4842
    @jeisonsanchez4842 Місяць тому +1

    Cool. I hope to see “sudo -s” and “sudo !!” as well.

  • @JeremyKingTech
    @JeremyKingTech Місяць тому

    THIS saves so much time! It's great that WinOS devs are looking to Linux to make life easier. Open source Windows OS when? 😛

  • @philosoaper
    @philosoaper Місяць тому +1

    fun to see Dave finally telling Hal to just Suck it Up and Do as Ordered

  • @skak3000
    @skak3000 Місяць тому

    Question: Will it be possible to talk about you point of view about TPM 2.0 requirements for Win11?
    Rigtig now Windows 10 have a Markedshare of 70% and End of Life is soon...

  • @hotplugin
    @hotplugin Місяць тому

    Thanks!

  • @MarshalerOfficial
    @MarshalerOfficial Місяць тому

    It took them around 17 years (from Vista to now) to implement something that is useful of making UAC bearable. Thanks.

    • @TonyPombo
      @TonyPombo Місяць тому

      The Windows equivalent, "runas", was added in Windows 2000 and works great. After playing with sudo, I honestly don't know why MS bothered adding it. Sudo seems to do the same thing, with less features and options.
      The "decades delay" might be because sudo isn't really needed.

  • @jalmarihuitsikko7211
    @jalmarihuitsikko7211 Місяць тому +1

    Sounds fun, even though opening terminal as admin is not so super difficult but okay I take it.

  • @MrEnyecz
    @MrEnyecz Місяць тому

    And what if you do multiple sudo-s, one after the other? Does that ask for a "yes" each time, or only once and then waits for a timeout (like in Linux)?

  • @babybirdhome
    @babybirdhome Місяць тому

    Not knocking this, because it definitely has its uses, but I’ve always just right-clicked the start button to open a command prompt or PowerShell as admin. It’ll be interesting to see what the security trade-offs are with this implementation and whether we’ll have to disable the feature like we’ve had to disable WSL at the office for security. Hopefully this is a sane implementation, but with that warning there, I’m not counting on it just yet.

  • @johnocrawford2116
    @johnocrawford2116 Місяць тому +1

    Control + left click on the new tab button opens up a new admin command prompt.

  • @zk_6312
    @zk_6312 Місяць тому +1

    It looks good. Now, if only they would change the command prompt to have persistent history. I believe powershell has it, but not the regular command prompt.

  • @b0kb0k
    @b0kb0k Місяць тому

    nice! about time...

  • @mvstermlnd
    @mvstermlnd Місяць тому +1

    Hello Dave, did u see that guy bypass the tmp and encrypted drives of windows within 45 seconds?

  • @solenoidnull9542
    @solenoidnull9542 Місяць тому

    In a linux terminal if you execute a bunch of sudo commands, only the first one triggers password credentials, with a timeout before credentials are required again. So far in windows you have to approve elevation every single time, which is exactly how I figured they would do it (half assed)

  • @Ver2ion
    @Ver2ion Місяць тому

    im actually pretty happy abt this

  • @mackfisher4487
    @mackfisher4487 Місяць тому

    Any automotive projects in your window Dave?

  • @Gunbudder
    @Gunbudder Місяць тому

    2:32 that's interesting to see "command-line" spelled that way. i've usually seen commandline or "command line". i can see the PR now for changing the spelling of the help menu for sudo...

  • @fred290e
    @fred290e Місяць тому

    You can launch Terminal from RUN and it will launch as Admin OR search Start Menu, Terminal and right click and Run as Admin

  • @badrats3542
    @badrats3542 Місяць тому +2

    Will it be possible to enable the windows 10/legacy UI on this new version? Sick of the windows 11 UI

    • @blairmurri8741
      @blairmurri8741 Місяць тому +1

      As far as the start menu is concerned, I'd prefer win7 but I'd take win10. There are some other places where win11 is better, though, although I would love to move my taskbar to a different edge of my screens (bottom isn't always best!)

  • @wideninghorizons474
    @wideninghorizons474 Місяць тому

    I remember I would put lot of time in checking the hard drive for errors during early days,using windows features.