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
- Why did ai skip web3?
- SQLite DB Migrations with PRAGMA user_version
- Microblog
- Making cgit Pretty
- Programming
Recent Favorite Blog Posts
This is a collection of the last 8 posts that I bookmarked.
- The contagion of fear from The Observation Deck
- The revolt of the reader from The Observation Deck
- Deeper dive: Were Touch Bar’s problems software rather than hardware? from Unsung
- Joining Cursor from Fatih Arslan
- Pluralistic: Digital sewer socialism (08 Aug 2026) from Pluralistic: Daily links from Cory Doctorow
- Pluralistic: Enshittification and Reverse Centaurs go global (29 Jul 2026) from Pluralistic: Daily links from Cory Doctorow
- AI Mania Is Eviscerating Global Decision-Making from Ludicity
- The default person from https://popagandhi.com/
Articles from blogs I follow around the net
Pots Money exploited for $5.71 million
An attacker drained $5.71 million in USDT from Pots Money, a defi protocol on BNB Chain that issues the IBS token, which it describes as an algorithmic, collateral-backed activity token with a $1 floor. A governance account minted 1 billion IBS and swapped...
via Web3 is Going Just Great December 3, 2026High on Stress
High on Stress A few days ago an interview with Joe Oestreich from Watershed popped into my Facebook feed. I, of course, clicked through, because I'm a Watershed fan boy. The podcast is the product of a guy from Minneapolis with a band, so I made a note of...
via O'DonnellWeb December 3, 2026A(I)rt-Directed Blog Posts
Remember art-directed blog posts? The idea is to create a bespoke design for each post unique to its contents. Here’s an example from Jason Santa Maria’s site. I remember briefly trying this. (Sorry, I don’t have any links to share that are still alive; ba...
via Jim Nielsen’s Blog December 2, 2026Generated by openring