Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pl explain about Bash

Status
Not open for further replies.

tekbond007

Programmer
Aug 7, 2001
16
IN
hai friends,


I got some info about bash in linex os
while typing wrong command it says

bash:command:command not found

what is that bash

i found a system file known as bash in root bin dir

but that file is not setted with PATH

How it relates

pl explain about importance of bash and related files


good bye

Thanking u

vijay
 
bash is one of the most important files on your system. On Linux it is the program that runs your default command shell (The non-graphical terminal environment where you can enter commands and see responses as text in standard output). You can think of it as similar to the MS-DOS command prompt on a windows computer, but far more powerful. The letters are an acronym for Bourne Again Shell, since the man who programmed it was called Bourne.

Much of what you do in Linux will go through bash. Even when you are working in the graphical X-window environment, you will still open terminal windows for command line work, which will most likely be in the bash environment.

bash is not the only environment for your terminal, there are several other popular shells, such as the Korn shell (ksh), the Z-shell (zsh), and several others.

Bash is not just a place to enter commands. You can also write short programs, or scripts, to automate many of the things you do from day to day.
 
Hi,

I assume you mean the error message when you type a command and it doesn't work, e.g.

$vcdsfg
bash:vcdsfg:command not found
$

That's just the shell commnader processor(bash) telling you it can't find a command within the PATH variable. It's very similar to DOS. If you enter the command 'env' you will see all the environment variables, including path. Normally, you would set the path in your '.bash_profile' file. For example, /home/joeuser/.bash_profile .

One problem you may find is if you logon as an ordinary user and then 'su' to become root. When you do it like that it still takes the PATH and other environment variables from the logged on user. So some commands like 'insmod' won't work unless you specify the full path, e.g. '/sbin/insmod'. If you don't know the full path to a priveleged command its easier to do 'su -' instead of 'su'. The extra minus applies all of root's environment so that you could do that type of command directly.

Hope this helps..


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top