Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
I'm having a very weird problem. whatever command I type I keep getting "bash: ls: command not found". That go for all the command Except for the "pwd" and "echo" no idea why its doing that?
By the way its a "SunOS" I don't have choice in the matter, as its a University Server and I have to use it to do my work.
some example.
[simt /home/ugrad/adh098] ls -l
bash: ls: command not found
[simt /home/ugrad/adh098] ls
bash: ls: command not found
[simt /home/ugrad/adh098] man
bash: man: command not found
[simt /home/ugrad/adh098] man bash
bash: man: command not found
[simt /home/ugrad/adh098] cd
[simt /home/ugrad/adh098] bash
bash: bash: command not found
[simt /home/ugrad/adh098] echo whats going on?
whats going on?
[simt /home/ugrad/adh098] ls -l
bash: ls: command not found
[simt /home/ugrad/adh098] ls
bash: ls: command not found
[simt /home/ugrad/adh098] pwd
/home/ugrad/adh098
[simt /home/ugrad/adh098]
P.S do I need to edit my profile to correct this problem?
Yep - PATH tells Bash where to look to find the executables like "ls" - usually , they'll be somwehre like /usr/bin
You need to add those directories to your PATH to make them work. In the meantime, use the full pathname to get the functionality: "/usr/bin/ls" instead of just "ls"
your path needs to list all the locations where binary files are found eg: bin;usr/bin;/usr/local/bin. If you want to change your shell then instead of PATH=/usr/bin/ksh you need
Code:
SHELL=/usr/bin/ksh
And to answer your question - to have bash as your default shell then you need
Code:
SHELL=/usr/bin/bash
though please make sure it exists before setting it, you can do that by typing bash in your current shell and seeing if you get a bash prompt
I dnt know if this is an SME problem or with the bash something... I've tried searching help from SME forums but nothing seems to help so I've figured maybe this could be with the bash problem o something...
Anyways here my problem, everytime I type this to the shell
Quote:
expand-template /root/.my.cnf
It would then give me an error "bash:expand-template: command not found"...
So the only way for me to get that command to work is this
Quote:
/sbin/e-smith/expand-template /root/.my.cnf
even if I just type in "db" in the shell, it give me the same problem "bash:db: command not found"...
Now does anyone of you guys no about on how to resolve this? Like how to change bash to the default... I'm a newbie a linux and SME, so if any of u have any info in helping, cud u also give a step-by-step detail in how to..
can anybody solve this problem!!
[prashanth@localhost ~]$ xlc_r –q64 –qarch=auto –qmkshrobj Hello.c –o libhello.so
bash: xlc_r: command not found
I am trying to compile native c code using JNI.but not able to do so
I noticed there was a dangling question in the last post. So should someone get here, I am adding a bit more detail.
Quote:
Originally Posted by PeterUK
Where is the ".profile" file? I have added path by the shell, but I would like to know where is the file? Thanks
Quote:
Originally Posted by Komakino
If you want to add a line to the PATH, do it like:
Code:
PATH=$PATH:/new/path:/another/new/path
The bash shell can use several configuration files. There are the default startup/configuration files in /etc (eg /etc/profile). These are intended to provide reasonable default settings. You can tailor your bash shell environment by creating specially named files in your home directory. These are:
When you login, the configuration files are searched for and read in an ordered fashion (/etc/profile -> ~/.bash_profile -> ~/.bash_login -> ~/.profile) In this manner your setting will add to or override the defaults.
When you are starting a bash shell after logging in, the ~/.bashrc file will be read if it exists.
Typically one creates any of ~/.bash_profile, ~/.bash_login, ~/.profile for settings that are needed for all of your bash shells. ~/.bashrc is reserved for setting the environment specifically for your interactive shells. bash reads the login configuration files just once at login. ~/.bashrc is read for each startup of an interactive shell.
The fine details for bash are found in the manual page, bash(1). Type
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.