Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Most likely your .bash_profile is corrupted. Since the other accounts are working, you may refer one of the working accounts profile.
No, that is not "most likely"; it is ONE possibility; please don't jump to conclusions without having any evidence to support them. It is much MORE likely that (since it WAS working), that the OP has manually entered a command to modify their path, or that another shell script has been run that overwrote the PATH variable. Also, you say ".bash_profile"...but don't mention the .profile, or .bashrc, ALL of which may be involved here. Since you have 'certifications', haven't you studied which files get read when a user logs in?
OP, have you recently edited your system profile? Your user profile? (ANY of them?). Logging out/back in is the best first step, since that will reset ALL your environment variables. If it still doesn't work, then you can work around it initally, just by typing
Code:
export PATH="/bin:/usr/bin:/usr/sbin:/sbin"
..which will put most things back in your path (like vi, etc.), and let you diagnose the problem more easily.
That's interesting....
On my Centos 6.5, vim is /usr/bin/vim and vi is purely an alias to vim (ie no /usr/bin/ entry).
iirc, last time I yum installed 'vi', it really does install /usr/bin/vi ie NOT a symlink to vim.
Guess different distros do it differently.
QN: what happens on openSUSE if you specifically(!) install 'vi'; do you get a real one?
That's interesting....
On my Centos 6.5, vim is /usr/bin/vim and vi is purely an alias to vim (ie no /usr/bin/ entry). iirc, last time I yum installed 'vi', it really does install /usr/bin/vi ie NOT a symlink to vim.
Guess different distros do it differently. QN: what happens on openSUSE if you specifically(!) install 'vi'; do you get a real one?
Don't know. If I query the vi package through yast, it tells me that vi is part of the vim-base package, which is already installed. I presume I could install it from source, but then I'd have to remove the symlink.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.