The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #253 (permalink)  
Old 05-21-2009
SilversleevesX SilversleevesX is offline
Registered User
  
 

Join Date: May 2009
Location: Northeast USA
Posts: 48
The witch ("which") method works better than most

Quote:
Originally Posted by sunray View Post
firstly how to know that which editor present on our system.

Is there any command to find out?
Try "which" followed by the name of some of the more common ones (emacs, vi, vim, nano, pico), one at a time to keep the returned strings simple. I find this method safer than just arbitrarily entering a command (the name of one) and finding out I can't exit it without terminating the shell session (or worse).

Whichever one comes up with a path to an executable, like /usr/bin/emacs2 instead of a lot of garbage telling you where editor x isn't in your execution or environment paths, that's the one you have.

And you may have more than one. Try them out and see which one you're more attuned to.

BZT

Last edited by SilversleevesX; 05-21-2009 at 09:33 AM.. Reason: Remembered why I "Which"