If you're using a file manager, Control+ H will hide/reveal such files/folders. Some config files may also be directly in your home folder. The preceding "." signifies the folder (or file) is hidden normally. There are also configuration files in your home folder and its subfolders such as the. If you change system-wide configuration files in a way that breaks things, they will still break! That seems obvious when stated that way, but sometimes people try to give users the right to edit files owned by root with sudoedit while still trying to restrain those users in some way through technical measures. It's a good tool, but you don't have to use it, and using it instead of other methods doesn't affect security in any decisive way. But the main reason to use sudoedit is convenience.īecause sudoedit is so useful and versatile, its benefits are sometimes overstated.
#USBEXTREME EDIT CONFIG FILE FULL#
If you want to set an editor just for sudoedit (and visudo) but not other programs, set SUDO_EDITOR instead of VISUAL.īecause the logic of checking if two files are the same and copying one onto another is simpler than the full logic of a text editor-and especially simpler than the full operation of a graphical program like Gedit-running sudoedit might be considered more secure in the specific sense that it is associated with a smaller attack surface. You can set the VISUAL environment variable persistently for your user to make sudoedit, and various other commands that need to pick an editor, use your preferred editor. Other ways of attempting this tend not to work very well.
It even works with GUI editors like Gedit: VISUAL=gedit sudoedit /etc/hostsįurthermore, because the editor is run as you, it uses your configuration, so if you've customized the behavior of your editor, those customizations are used.
To edit with nano: VISUAL=nano sudoedit /etc/hosts Sudoedit works with your choice of text editor.
#USBEXTREME EDIT CONFIG FILE PASSWORD#
Checks if you've recently authenticated with sudo from the terminal you're in (like sudo does), an prompts you for your password if you haven't.You can instead use sudoedit, which is documented in the same manpage as sudo.įor example, to edit /etc/hosts: sudoedit /etc/hosts But just because only root can make changes the files does not mean you have to run your text editor as root. It's common to run a text editor as root with sudo, and other answers here show how. System-wide configuration files, which are often in /etc, are owned by root and you need to elevate your privileges to edit them.