Many people love using Vim in command line. But Nano is easier to use if you are not familiar with vim. Different between Nano & Vim.
- Easy to use and master.
- Nano has most of the shortcuts listed at the bottom of the window, making it extremely simple to use.
- Search function
- Search and replace
- “Goto line” command
- Automatic indentation
- Tough to get started with and master. The editing and command modes will confuse beginners.
- Session recovery
- Split screen
- Tab expansion
- Completion commands
- Syntax coloring
The Crontab File
Cron is a tool for configuring scheduled tasks on Unix systems. It is used to schedule commands or scripts to run periodically and at fixed intervals.
The command crontab (cron table) is used to edit the list of scheduled tasks in operation, and is done on a per-user basis. Each user, including root, can have a cron file. So the user who has appropriate permissions can create their own crontab file.
How to specify nano or vim as editor for crontab file
Edit crontab with an editor other than the default
Using nano to edit the cron
export VISUAL=nano; crontab -e
Using vim to edit the cron
export VISUAL=vim; crontab -e
Setting Nano as the default crontab commandline editor
Enter following command and select
Run the following command to check if you have a crontab file:
If you don’t have a crontab file the message no crontab for
username will appear.
To create or edit a crontab file run the following command:
Default crontab file - Gist
How To Remove A Crontab File
However, if you want to remove your user’s crontab file run the following command:
A safer way to do this is to run the following command: