본문 바로가기
기타 정보/꿀팁

[Windows 11] windows에서 sudo 명령어 이용하기

by 째스터 2024. 8. 10.
728x90

Windows에서 sudo를 이용할 수 있게 됐다는 소식을 들은 지는 오래됐는데 아무리 기다려도 쓰지 못했다.
그래서 해당 공지를 다시 꼼꼼히 읽어봤다.
https://devblogs.microsoft.com/commandline/introducing-sudo-for-windows/

 

Introducing Sudo for Windows!

Introducing Sudo for Windows We’re excited to announce the release of Sudo for Windows in Windows 11 Insider Preview Build 26052! Sudo for Windows is a new way for users to run elevated commands directly from an unelevated console session. It is an ergon

devblogs.microsoft.com

 

늘 그랬듯이 다시 잘 읽어 보면 내 잘못이다.
나는 Windows Insider가 아니었기 때문이다.
아래 페이지에서 Windows Insider로 등록할 수 있다.

https://www.microsoft.com/en-us/windowsinsider/register

Windows 설정(win + I) > Windows 업데이트 > Windows 참가자 프로그램 메뉴에서 시작하기 버튼을 클릭한다.
MS 계정을 연동하고 개발자 채널을 선택한다.

 

이 작업을 마치면 컴퓨터 재부팅을 해야 한다.

다시 Windows 설정 > Windows 업데이트로 돌아가서 최신 업데이트가 제공되는 즉시 받기를 켬으로 변경한다.
그리고 업데이트 확인 버튼을 클릭하면 Windows 11 Insider Preview를 다운로드하기 시작한다.
(이 과정이 매~우 오래 걸린다.)

몇 번의 재부팅을 마치면 업데이트가 끝나고
Windows 설정 > 시스템 > 개발자용에서 sudo 사용을 켬으로 변경한다.

 

처음 sudo 없이 실행했을 때 명령어를 실행했을 때 권한이 필요하다는 메시지가 표시 됐지만
sudo를 붙이니깐 잘 실행하는 것을 확인할 수 있다.

sudo netstat -ab

 

728x90

댓글