setting a cron in ssh using root

shanit

Well-Known Member
Dec 18, 2005
46
0
156
Hi I am attempting to put in
crontab -e when in ssh and it tells me this

[email protected] [~]# crontab -e
/bin/sh: pico: command not found
crontab: "pico" exited with status 127

can someone help me fix this issue I think when i had my other server i had same problem and someone told me something to do and it fixed it. but now i have a new one and its been a while since i had to do it. Thanks

Shannon
 

madaboutlinux

Well-Known Member
Jan 24, 2005
1,051
2
168
Earth
pico is set as a default editor on your server and it seems it is not installed. To change the default editor to 'vi', do the following :-
]# which vi << This will give you the path for 'vi'.
]# export EDITOR= path/of/vi << normally it will be /bin/vi or /usr/bin/vi.

To check whether the default editor is changed :-
]# set | grep EDITOR

Editor is now changed to 'vi'. Now you can use 'crontab -e' to edit cronjob's on server.

OR install pico.
 

nettigritty

Well-Known Member
PartnerNOC
Jan 21, 2004
192
0
166
Bangalore, India
shanit said:
Hi I am attempting to put in
crontab -e when in ssh and it tells me this

[email protected] [~]# crontab -e
/bin/sh: pico: command not found
crontab: "pico" exited with status 127

can someone help me fix this issue I think when i had my other server i had same problem and someone told me something to do and it fixed it. but now i have a new one and its been a while since i had to do it. Thanks

Shannon
You might have nano instead. create a symlink from pico to nano. that should work.