Change the Default Terminal Editor in Debian
Debian comes with a very handy utility called update-alternatives that helps to set default tools for various tasks.
It is possible for several programs fulfilling the same or similar functions to be installed on a single system at the same time. For example, many systems have several text editors installed at once. This gives choice to the users of a system, allowing each to use a different editor, if desired, but makes it difficult for a program to make a good choice for an editor to invoke if the user has not specified a particular preference.On Linode, it seems that the default editor is nano, I prefer to use vim for editing git commits, visudo, and other things that use the default editor which is symbolically linked through
/usr/bin/editor.
The update-alternatives package basically changes the symbolic links for you. In order to change your default editor, you simply need to run the following command:
sudo update-alternatives --config editor
There are 3 choices for the alternative editor (providing /usr/bin/editor).Selection Path Priority Status
0 /bin/nano 40 auto mode 1 /bin/nano 40 manual mode 2 /usr/bin/vim.basic 30 manual mode
- 3 /usr/bin/vim.tiny 10 manual mode
Press enter to keep the current choice[*], or type selection number:
levlaz@dev:~$ ls -al /usr/bin/editor lrwxrwxrwx 1 root root 24 Feb 10 20:49 /usr/bin/editor -> /etc/alternatives/editor levlaz@dev:~$ ls -al /etc/alternatives/editor lrwxrwxrwx 1 root root 17 Apr 28 18:56 /etc/alternatives/editor -> /usr/bin/vim.tiny
Thank you for reading! Share your thoughts with me on bluesky, mastodon, or via email.
Check out some more stuff to read down below.
Most popular posts this month
- 2024
- Reinstalling Windows at 1am
- SQLite DB Migrations with PRAGMA user_version
- My Custom Miniflux CSS Theme
- How to Disable Wayland in Debian Testing
Recent Favorite Blog Posts
This is a collection of the last 8 posts that I bookmarked.
- Sit On Your Ass Web Development from Jim Nielsen’s Blog
- Underused Techniques for Effective Emails from Refactoring English
- Death by a thousand slops from daniel.haxx.se
- The AGI economy is coming faster than you think from Freethink
- Rolling the ladder up behind us from Xe Iaso's blog
- In Praise of “Normal” Engineers from charity.wtf
- Reports of Bluesky's death have been greatly exaggerated from The Torment Nexus
- What Would a Kubernetes 2.0 Look Like from matduggan.com
Articles from blogs I follow around the net
People fall in love with all kinds of things including AI chatbots
OpenAI recently released a new version of its ChatGPT artificial-intelligence engine, called GPT-5. Normally, I wouldn't choose to write about the latest iteration of a product that is in its fifth generation, especially since GPT-5 doesn't seem r…
via The Torment Nexus August 14, 2025Theatre Review: Being Mr Wickham ★★★★★
Mr Wickham is ready to set the record straight. Celebrating the 250th anniversary of Jane Austen’s birth, Adrian Lukis, who starred in the renowned BBC TV adaptation of Pride and Prejudice, returns to the role of Mr Wickham. Join Pride and Prejudice’s mo…
via Terence Eden’s Blog August 14, 2025The Library
Rose’s favorite daddy-daughter dates are at the libraries. We try to go once or twice a week. To play. To build in the sensory room. To look at all the Amiibos near the front entrance. To use the elevator. To walk around. To observe. To think. To have a…
via nashp.com August 14, 2025Generated by openring