0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

管理者でメモ帳を開いてhostsを編集 【ターミナル】

Posted at

概要

Windowsでhosts修正するときに管理者権限で開きたい時、結構めんどくさいです。
そこでコマンドプロンプトから一発でhostsを開いて編集するコマンドを紹介します。

コマンド

powershell -NoProfile -ExecutionPolicy unrestricted -Command "start notepad C:\Windows\System32\drivers\etc\hosts -verb runas"

上記をコマンドプロンプトから実行することでメモ帳が開かれます。
かなり便利なので使ってみてください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?