>_
linuxcommand.dev
Home
Roadmap
Contact
EN
Dark
>_
>_
linuxcommand.dev
Home
Roadmap
Contact
Legal Notice
Privacy Policy
Language
DE
EN
Design
Dark
Startseite
›
:w sudo tee %
Vim
:w sudo tee %
Write out the current file using `sudo`.
Ubuntu
CentOS
Debian
Arch
SUSE
Slackware
Alpine
Fedora
Last updated:
2026-07-05
Report error
Syntax
Copy
$
:w sudo tee %
Examples
Examples
$
:w sudo tee %
Typical use cases
Save with sudo
:w sudo tee %
Note
Global and Exiting. Saves the file with sudo privileges.
Export
Text
JSON
Script