Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 1119  / 2 Years ago, sat, july 9, 2022, 3:47:42

I've been trying to find out how to change application executables (I don't know how to call them) so when you do vim file in the console it actually runs nano file.



I don't care if vim is installed or not on the operating system.



How can I achieve this?


More From » executable

 Answers
5

With a symbolic link in /usr/local/bin. This works even after the installation of vim, because applications in /usr/local/bin have a higher priority per default PATH settings. To run the native vim installation you would have to run the full path /usr/bin/vim.



sudo ln -s /usr/bin/nano /usr/local/bin/vim


Check the symbolic link with



stat /usr/local/bin/vim


You should see something like this:



  File: ‘/usr/local/bin/vim’ -> ‘/usr/bin/nano’
Size: 11 Blocks: 0 IO Block: 4096 symbolic link
Device: 801h/2049d Inode: 5377195 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2015-11-29 20:22:49.266067541 +0100
Modify: 2015-11-29 20:22:47.566056452 +0100
Change: 2015-11-29 20:22:47.566056452 +0100
Birth: -

[#17378] Sunday, July 10, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
suspengn

Total Points: 477
Total Questions: 104
Total Answers: 100

Location: Rwanda
Member since Thu, Feb 10, 2022
2 Years ago
;