LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-02-2015, 11:15 PM   #1
flash_os
LQ Newbie
 
Registered: Dec 2014
Distribution: Fedora 20
Posts: 8

Rep: Reputation: Disabled
Question Fedora shows 'man vim' but when execute 'vim' got "bash: vim: command not found..." ?


Fedora shows 'man vim' info, but when execute 'vim' I got "bash: vim: command not found..." Why?
 
Old 01-03-2015, 02:40 AM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 7,874
Blog Entries: 10

Rep: Reputation: Disabled
Quote:
Originally Posted by flash_os View Post
Fedora shows 'man vim' info, but when execute 'vim' I got "bash: vim: command not found..." Why?
Hi:

Welcome to Linux Questions.

It could be that vim isn't installed.

Open your terminal and ("as root") run:
Code:
yum install vim -y
To learn how to use vim just type vimtutor and the terminal will take you through a series of lessons to
teach you how to use it. (if you haven't already)
 
Old 01-03-2015, 02:56 AM   #3
ndc85430
Member
 
Registered: Apr 2014
Distribution: Slackware
Posts: 92

Rep: Reputation: Disabled
Well, to answer the question as posed, different paths are used to find man pages and to find executables (PATH for the latter and possibly MANPATH for the former). However, I'm not sure why you'd have the man page for vim without having the executable!

Last edited by ndc85430; 01-03-2015 at 03:06 AM.
 
Old 01-03-2015, 09:41 AM   #4
flash_os
LQ Newbie
 
Registered: Dec 2014
Distribution: Fedora 20
Posts: 8

Original Poster
Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by Ztcoracat View Post
Hi:

Welcome to Linux Questions.

It could be that vim isn't installed.

Open your terminal and ("as root") run:
Code:
yum install vim -y
To learn how to use vim just type vimtutor and the terminal will take you through a series of lessons to
teach you how to use it. (if you haven't already)
Still I get:

[root@localhost ~]# vim
bash: vim: command not found...
 
Old 01-03-2015, 09:43 AM   #5
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,825
Blog Entries: 1

Rep: Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221
Quote:
Originally Posted by flash_os View Post
Still I get:

[root@localhost ~]# vim
bash: vim: command not found...
Have you successfully installed it as suggested above? Can you post the exact output of the command:

Code:
yum install vim -y
 
1 members found this post helpful.
Old 01-03-2015, 10:34 AM   #6
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Arch & Debian
Posts: 1,183

Rep: Reputation: 284Reputation: 284Reputation: 284
What is the output of:
Code:
whereis vim
 
Old 01-03-2015, 11:14 AM   #7
flash_os
LQ Newbie
 
Registered: Dec 2014
Distribution: Fedora 20
Posts: 8

Original Poster
Rep: Reputation: Disabled
Arrow

Quote:
Originally Posted by sycamorex View Post
Have you successfully installed it as suggested above? Can you post the exact output of the command:

Code:
yum install vim -y
Code:
[root@localhost ~]# yum install vim -y
Loaded plugins: langpacks, refresh-packagekit
Resolving Dependencies
--> Running transaction check
---> Package vim-enhanced.x86_64 2:7.4.475-2.fc20 will be installed
--> Processing Dependency: vim-common = 2:7.4.475-2.fc20 for package: 2:vim-enhanced-7.4.475-2.fc20.x86_64
--> Processing Dependency: libgpm.so.2()(64bit) for package: 2:vim-enhanced-7.4.475-2.fc20.x86_64
--> Running transaction check
---> Package gpm-libs.x86_64 0:1.20.7-3.fc20 will be installed
---> Package vim-common.x86_64 2:7.4.475-2.fc20 will be installed
--> Processing Dependency: vim-filesystem for package: 2:vim-common-7.4.475-2.fc20.x86_64
--> Running transaction check
---> Package vim-filesystem.x86_64 2:7.4.475-2.fc20 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch         Version                  Repository     Size
================================================================================
Installing:
 vim-enhanced         x86_64       2:7.4.475-2.fc20         updates       1.0 M
Installing for dependencies:
 gpm-libs             x86_64       1.20.7-3.fc20            fedora         32 k
 vim-common           x86_64       2:7.4.475-2.fc20         updates       5.9 M
 vim-filesystem       x86_64       2:7.4.475-2.fc20         updates        12 k

Transaction Summary
================================================================================
Install  1 Package (+3 Dependent packages)

Total size: 7.0 M
Installed size: 23 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction (shutdown inhibited)
  Installing : gpm-libs-1.20.7-3.fc20.x86_64                                1/4 
  Installing : 2:vim-filesystem-7.4.475-2.fc20.x86_64                       2/4 
  Installing : 2:vim-common-7.4.475-2.fc20.x86_64                           3/4 
  Installing : 2:vim-enhanced-7.4.475-2.fc20.x86_64                         4/4 
  Verifying  : 2:vim-enhanced-7.4.475-2.fc20.x86_64                         1/4 
  Verifying  : 2:vim-filesystem-7.4.475-2.fc20.x86_64                       2/4 
  Verifying  : gpm-libs-1.20.7-3.fc20.x86_64                                3/4 
  Verifying  : 2:vim-common-7.4.475-2.fc20.x86_64                           4/4 

Installed:
  vim-enhanced.x86_64 2:7.4.475-2.fc20                                          

Dependency Installed:
  gpm-libs.x86_64 0:1.20.7-3.fc20          vim-common.x86_64 2:7.4.475-2.fc20  
  vim-filesystem.x86_64 2:7.4.475-2.fc20  

Complete!
[root@localhost ~]#
 
Old 01-03-2015, 11:16 AM   #8
flash_os
LQ Newbie
 
Registered: Dec 2014
Distribution: Fedora 20
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Head_on_a_Stick View Post
What is the output of:
Code:
whereis vim

Code:
$ whereis vim
vim: /usr/bin/vim /usr/share/vim /usr/share/man/man1/vim.1.gz
 
Old 01-03-2015, 11:33 AM   #9
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Arch & Debian
Posts: 1,183

Rep: Reputation: 284Reputation: 284Reputation: 284
What is your $PATH?
Code:
echo $PATH
Can you start it when you declare the full path?
Code:
# /usr/bin/vim
 
Old 01-03-2015, 11:39 AM   #10
flash_os
LQ Newbie
 
Registered: Dec 2014
Distribution: Fedora 20
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Head_on_a_Stick View Post
What is your $PATH?
Code:
echo $PATH
Can you start it when you declare the full path?
Code:
# /usr/bin/vim
Yes.


But maybe I need to restart the system?
What command for Terminal to restart the system?

Last edited by flash_os; 01-03-2015 at 11:41 AM.
 
Old 01-03-2015, 11:52 AM   #11
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Arch & Debian
Posts: 1,183

Rep: Reputation: 284Reputation: 284Reputation: 284
Code:
# reboot
 
Old 01-03-2015, 11:58 AM   #12
flash_os
LQ Newbie
 
Registered: Dec 2014
Distribution: Fedora 20
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thanks.
Now it's work.
 
Old 01-03-2015, 12:03 PM   #13
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Arch & Debian
Posts: 1,183

Rep: Reputation: 284Reputation: 284Reputation: 284
Good stuff!

You should mark the thread as "[SOLVED]" using the forum tools.

Not sure how to do that exactly -- I don't start threads, I finish them!
 
Old 01-03-2015, 12:15 PM   #14
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,825
Blog Entries: 1

Rep: Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221
Thread Tools in the top right-hand corner just above the first post on the page = > Mark as solved.

Quote:
I don't start threads, I finish them!
Smooth
 
Old 01-03-2015, 03:44 PM   #15
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
It's up to the OP to mark thread as solved.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Vim: "gww" command mzh Linux - General 2 03-25-2012 07:30 AM
[SOLVED] How do you write <Esc> in the vim command line (:vim command). stf92 Linux - General 6 06-26-2011 06:33 AM
Vi/vim and the "insert-only-one-char" command. stf92 Linux - Newbie 7 12-03-2010 11:16 PM
Editor comparison: vim VS vim-lite, Cleaning vim Ruler2112 *BSD 4 04-13-2009 05:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:32 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration