Find the answer to your Linux question:
Results 1 to 9 of 9
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Where does VIM actually fit in???

    hi guys,

    how essential is it to know vim as a linux admin?

    i have been watching a few tutorials and realise that it is its own world.
    i am just trying to work out where it actually fits in
    im a windows admin trying to learn more on Linux

    is it just used mostly for editing config files on Linux?
    surely you wouldnt use it to write perl scripts? are there not better tools for writing perl etc

    just like i wouldnt use notepad to write html or php...i might use notepad ++ maybe

    any info appreciated
    thanks for reading

  2. #2
    Linux Engineer
    Join Date
    Jan 2005
    Saint Paul, MN
    The UNIX standard says that it must contain an editor that is compatible with "VI", and "vim" (vi improved) meats that need. Once you get past the curve on the learning curve, it is a very great editor.

    The commands are very old and if you learn what they mean (like 'x' is 'x out' which is what you did back on a type writer way before "white out" does a character delete).

  3. #3
    yes alf i understand, but where is it mostly used in the work place? as an admin...

  4. $spacer_open
  5. #4
    Linux Guru
    Join Date
    Oct 2007
    Tucson AZ
    As indicated, vi has been around for a long time and works very well. I don't know that other editors are necessarily 'better', but most of us are probably more familiar with other editors, particularly coming from a different OS. I don't know that vi is 'necessary' for any editing. Editing 'sudo' is supposed to be done using 'visudo' command but on some distributions, when you type in that command it will open a different editor. I believe using Ubuntu or one of its derivatives (can't remember which) it open the nano text editor. So use what you want unless you get some solid info indicating it is required for some other purpose.

  6. #5
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    I would think that you should have at least a passing familiarity with vi/vim. In the case of system breakage, it's possible that you may be dropped to a shell login to perform repairs. In which case vi/vim might be the editor that you are forced to use.

    I'm personally no expert with it, but I find it a useful practice to open up some of my smaller config files in vim just so I keep a few things about it fresh in my head.

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  7. #6
    Linux Engineer
    Join Date
    Jan 2005
    Saint Paul, MN
    Most admins edit the configuration files using vim rather an some GUI application. This is mainly for two reasons:
    1. It is faster (can be much much faster in some cases)
    2. usually there is not a GUI installed on the servers being maintained
    3. working on a remote machine passing though a couple of firewalls

    Also if they write scripts (bash, awk, python, perl, etc) they use vim.

    I spend my work writing code (for a Gentoo Linux) and use vim about 7 hours a day. Yesterday I was working with a person that has used vim for many years and he learned many new commands and functions within vim. I also introduced "comm" to him and few other command line utilities as well. We got the task done in two hours which had been estimated at 4 hours by our boss.

    The stuff we were using in vim would not be available in Glade or Eclipse.

  8. #7
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Either at home or at work or down the pub
    vim has been installed on nearly* every Linux server I have ever used so as an admin you should look for at least basic familiarity in the editor. How to move around a file, change modes, find and replace etc. would be the minimum. At some point I have no doubt that you will be remoted on to a server with your only weapon being vi or vim.

    Also, you should have a passing acquaintance with nano as it seems to be the other editor of choice.

    * It may have been all Linux servers but I can't remember!
    Last edited by elija; 04-12-2013 at 11:30 AM.
    Should you be sitting wondering,
    Which Batman is the best,
    There's only one true answer my friend,
    It's Adam Bloody West!

    The Fifth Continent

  9. #8
    Alf and Elija excellent answers 10 out of 10...

    "At some point I have no doubt that you will be remoted on to a server with your only weapon being vi or vim." are talking about editing files on a remote server? woudl you connect using something else and edit using vim...please explain more...and if possible give me a real world example...i love those

    thanks alot guys

  10. #9
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Depending on the usecase, you can login remote via ssh or telnet, maybe via a serial console.
    vim is for editing.

    "Right tool for the job" is part of the unix philosophy.
    You must always face the curtain with a bow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts