How do I make gedit the default editor for crontab?
So far I've tried:
sudo update-alternatives --install /usr/bin/gnome-text-editor gnome-text-editor /usr/bin/gedit 100
and
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/gedit 100
No luck so far. (maybe I just need to reboot?)
Best Answer
Open
.profile
file using your desired editor:Add this line to the file and save it:
Logout and re-login. Now when you use
crontab -e
it would opengedit
.Remember that it's going to set
gedit
as default editors for other commands too, if you want it to only affectcrontab
, then you can create an alias: