LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 11-21-2005, 11:41 AM   #1
arichardson
LQ Newbie
 
Registered: Nov 2005
Posts: 25

Rep: Reputation: 15
making linux recognize a command


In Windows, I can alter my PATH environment and make it recognize unknown commands. how can I do this in Linux?

Ie, I installed VIM and I have to fully qualify the path + command to edit a text file when I simply want to type {vim README}

 
Old 11-21-2005, 12:13 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
You can just link vim to someplace in your current PATH:

# ln -s <path to vim> /usr/bin/vim

creating a vim link in /usr/bin which is almost always in PATH.

You can also edit some of your bash config files. Usually .bash_profile is where you would do that by editing the line like so:

PATH=$PATH:<insert path to vim directory>

In some distros you would edit .bashrc instead. These are hidden files in your home directory thus the "." in front of the file name. That will change things on a per user basis. You can also edit /etc/profile to edit the PATH for all users but that's usually more complicated. Note, you should reboot for the change to take effect.
 
Old 11-21-2005, 12:36 PM   #3
arichardson
LQ Newbie
 
Registered: Nov 2005
Posts: 25

Original Poster
Rep: Reputation: 15
thanks a bunch! I was thinking that 'linking' was the way to go. What yields the best performance? Or does that even matter? (ie how long it takes to load the said command)
 
Old 11-21-2005, 09:14 PM   #4
kurtdriver
Member
 
Registered: May 2005
Location: Vancouver, Canada
Distribution: Fedora 18, Puppy Linux, various others
Posts: 107

Rep: Reputation: 15
As an aside, you don't need to open text files (such as README) in an editor. Much easier is to use more or less . I prefer less as it, in fact, does more!
 
Old 11-22-2005, 06:40 AM   #5
arichardson
LQ Newbie
 
Registered: Nov 2005
Posts: 25

Original Poster
Rep: Reputation: 15
I have gotten used to 'cat' to see text files even though it looks sorta messy at times LOL
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Making Libranet recognize other hard drives jonr Libranet 4 11-20-2004 11:10 AM
Is this command OK for making a PATCH? theYinYeti Programming 2 08-10-2004 02:39 AM
how do i command linux to recognize the new system? ph4tk1dd Linux - Laptop and Netbook 5 08-09-2004 06:00 PM
making system recognize gtk fobius Linux - Software 1 01-07-2004 08:08 PM
making gaim 0.71 recognize gtk+2.2.0 fobius Linux - Software 1 12-25-2003 10:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 08:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration