Anyone know what is the default text editor for Ubuntu Server 22.04 LTS with minimal installation?
I tried vim, nano, editor, gedit. none of the above is working.
Anyone know what is the default text editor for Ubuntu Server 22.04 LTS with minimal installation?
I tried vim, nano, editor, gedit. none of the above is working.
You can use cat in a pinch (I needed to fix my netplan.yaml in order to connect to the internet, and thus couldn't install another editor)
cat - > /path/to/file then just ctrl+c to exit
you can also use 'sed' for simple changes. For example if you want to replace the ip address:
sed -i s/192.0.2.0/192.0.2.1/ /etc/netplan/00-installer-config.yaml
In Ubuntu 22.04 the minimal installation is for machines where no human is logging in. And they really mean it! You are not supposed to ever login. Only automated tools are expected, which of course do not use visual text editors. Indeed, it was quite surprising because in previous Ubuntu versions the minimal installation meant that no regular users are logging in but a few interactive programs were still installed for sysadmins. Not for 22.04.
Abbreviations:
I had the same question, and I'm a little scared to report that it appears there isn't an editor installed with the Ubuntu 22.04 LTS minimal server install...
Ubuntu (including the minimal server install) ships with a utility to set the default editor (aptly named select-editor; see the Ubuntu select-editor Manpage). Honestly, it's kind of ironic, given the following, but... *shrugs*
I ran select-editor on my fresh minimal server install and got:
user@server:/$ select-editor
update-alternatives: error: no alternatives for editor
user@server:/$
So I installed nano, and ran it again to see what would happen:
user@server:/$ select-editor
user@server:/$
It seems that, now that there's only one editor installed, it ran without any further input and threw no errors.
To sate my growing curiosity, I installed vim as well and ran select-editor again:
user@server:/$ select-editor
Select an editor. To change later, run 'select-editor'.
1. /bin/nano <---- easiest
2. /usr/bin/vim.basic
Choose 1-2 [1]:
So all I can conclude from this is that the Ubuntu 22.04 LTS minimal server install does not ship with a text editor. *shrugs again; shakes head in disbelief*
Try vi or vim.tiny instead of vim or you could install nano using the following commands:
sudo apt update
sudo apt install nano
cat (it's really not much different than a regular text editor but you can't edit in place, only create new files).sed to edit in place.and the secret third option is to not use the minimized install option if you need more user friendly tools before accessing the internet.
According to the list of installed packages posted here, there is no other text editor. As far as I understand, the minimized setup was originally intended for cloud instances, in which they have internet access by default. So if you want a text editor, they would expect you to install it yourself.
I usually use the mini.iso which is similar. Although it's set up to install over the internet so it obviously assumes you have network access.
Normally, I'll set up a virtual AP from a separate router with a fairly easy password to use during the installation process.
Nothing fancy:
Once everything is installed using apt and/or tasksel, I'll do the full configuration for networking and disable the virtual AP on the router.
So I guess the 4th option would be to make the network easier to connect to using the installer options so that writing a configuration file isn't necessary to access the internet.
I have checked :
apt list --installed| grep -i vim
result after installation of vim-doc
vim-common/jammy-updates,jammy-updates,jammy-security,jammy-security,now
2:8.2.3995-1ubuntu2.3 all [installed,automatic]
vim-doc/jammy-updates,jammy-updates,jammy-security,jammy-security,now 2:8.2.3995-1ubuntu2.3 all [installed]
vim-tiny/jammy-updates,jammy-security,now 2:8.2.3995-1ubuntu2.3 amd64 [installed,automatic]
It is: VIM - Vi IMproved version 8.2.4919