In the bash shell you can set the default editor by
Code:
export VISUAL=/bin/nano
. If you want this to be automatic, add this line to the login script in your home directory
Code:
~/.bashrc
With the above mentioned solution you can set the editor for every seperate user, but what do you need to do, to set nano as the default editor for every user ??
The problem I have is, when i want to edit a cronjob for a user (crontab -u user -e) then you don't have the control over the editor you want to use. Suse then opens the cronjob in Vim.
When you are on the system as root (either by logging in directly or by 'su -' or similar), use the command
Code:
cd ~
. It will take you to the home dir of the effective user. Then
Code:
nano .bashrc
edit and you're done.
If you login as a regular user 1st and the 'upgrade' yourself, you can also edit the .bashrc file of the regular user. Environment variables are promoted to sub-shells.
Recent comments
8 hours 39 min ago
11 hours 34 min ago
12 hours 48 min ago
14 hours 12 min ago
15 hours 50 min ago
17 hours 18 min ago
18 hours 32 min ago
1 day 10 hours ago
1 day 11 hours ago
1 day 15 hours ago