LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 09-03-2001, 06:57 PM   #1
Timato
LQ Newbie
 
Registered: Sep 2001
Distribution: Red Hat, slackware, turbolinux
Posts: 6

Rep: Reputation: 0
Question Bash? Get me outta here!


To fellow linux users,

I am a newbie to linux and need some help getting out of the bash shell. My dad is also a newbie and he is the one who got it in bash in the first place (messing around with shells). I hardly know how to use the "normal" linux command line, let alone bash. I just want to get it back to the default command line that it was right after installation. Any help is appreciated.
 
Old 09-03-2001, 11:56 PM   #2
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
A little more info would help:
- What distro (and version) of Linux are you running?
-Which shell were you using before?
- Are you alluding to the fact that your system used to boot into a GUI directly, as opposed to putting you at the command line? It is important not to confuse a graphical (GUI) interface with a shell.

Here are a couple of ideas:

-There is no "normal Linux command line"; the command-line environment is totally dependent on which shell (bash, csh, tcsh, sh, etc.) you use. You can determine which shell you are currently running by typing (case-sensitivity applies):
Code:
echo $SHELL
You can use the "chsh" command to change each user's default shell.

- If you mean that your system used to boot directly into X (the GUI), but for some reason it now just dumps you to a command prompt, you need to edit your /etc/inittab file to re-enable booting to the GUI. I use vi as a command-line editor, so as an example, do the following (as root):

-type "vi /etc/inittab" (no quotes) # the file should then be displayed

-find the line near the begining of the file which reads something like "id:<some number>:initdefault:". Directly above that should be a description of the different run levels, which corresponed to the value of <some number> in my example above. Runlevel 5 is usually the entry which will boot you directly into the X GUI, but it may be different for your distro.
- If you need to edit the value, hit the insert key (to enter insert mode) and replace the value in <some number> with the value you want. To save the changes and exit, hit <ESC>, then type ":wq" (again, no qoutes).

-log out and log back in. You should be taken to the GUI automatically.
 
Old 09-04-2001, 12:25 AM   #3
isajera
Senior Member
 
Registered: Jun 2001
Posts: 1,635

Rep: Reputation: 45
typing "exit" will get you out of most shells.
 
Old 09-04-2001, 12:38 AM   #4
Timato
LQ Newbie
 
Registered: Sep 2001
Distribution: Red Hat, slackware, turbolinux
Posts: 6

Original Poster
Rep: Reputation: 0
I am not at all talking about the GUI of Linux, just the command line. I am using Red Hat linux 7.1 I believe. I have no idea exactly what shell I was using before, just whatever Red Hat 7.1 starts you out with. I tried several commands in bash, one for example is xconfig. Of course it didn't work because I'm guessing bash has a completely different system of commands. Anyhow I would like to get back to the Red Hat default shell.
 
Old 09-04-2001, 12:54 AM   #5
isajera
Senior Member
 
Registered: Jun 2001
Posts: 1,635

Rep: Reputation: 45
well... no. on the surface, the difference between the shells is pretty small. most commands will work the same in sh or csh as in bash. the difference is mainly in writing shell scripts.

what you're referring to as "commands" are actual programs. a shell is a program whose main purpose is to execute other programs. common programs would be :
cp - copy file
ls - list files (dos equiv of "dir")
rm - remove file
mv - move file

another helpful program is "man" - it's the manual page function to get more info about programs. for example, to get help with cp, you'd type "man cp".

for the vast majority of command-line uses, it doesn't really matter what shell you use. there will be slight differences, for reasons that i don't want to bother going into, but most programs will work exactly the same.
 
Old 09-04-2001, 05:51 PM   #6
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
Hmm, I was under the impression that Bash was the default shell in Redhat. It certainly was in RH 6.2.

Isajera is correct, though; the command used to execute a program would be basically the same regardless of the shell you use. When you say the commands "didn't work", what are the exact errors you get? I've got a suspicion that someone may have accidentaly deleted files, changed permissions, or mucked up the pathing.
 
Old 09-04-2001, 10:33 PM   #7
Timato
LQ Newbie
 
Registered: Sep 2001
Distribution: Red Hat, slackware, turbolinux
Posts: 6

Original Poster
Rep: Reputation: 0
I take it back. I tried again and I did get a few commands to work, I must have been doing something wrong before. But still for some reason xconfig will not work. My goal is to get the GUI going which I have done before but something is wrong. The error I get when I type in xconfig is "bash: unknown command" or something similar. I guess the problem isn't the shell at all. Whatever it is its getting on my nerves. I remember setting up xwindows before but on a different distrobution (slackware linux), could this be the problem? I will stop now and let people provide input.
 
Old 09-05-2001, 01:40 AM   #8
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
OK- that makes sense. In Redhat, the X configuration program is Xconfigurator, not xconfig. XF86Setup is another tool available in some distros, but if you have Xconfigurator, it's easier to use.
Also, remember that Linux is case-sensitive (as opposed to DOS). If you type "xconfigurator" instead of "Xconfigurator", you'll get an error similar to "bash: command not found". This is the shell's (in this case bash's) way of saying "hey- message from the shell: I don't understand what you want me to do".
 
  


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
$LINENO can't be modified in bash 3.0, while it can be in bash 2.05b Darwish Linux - Software 1 11-07-2005 02:57 PM
Fresh outta the can noob needs help w/ dependencies, Yum penguinista66 Linux - Newbie 1 07-28-2005 10:55 AM
why did bash 2.05b install delete /bin/bash & "/bin/sh -> bash"? johnpipe Linux - Software 2 06-06-2004 06:42 PM
Ive ran outta things to do.. at least I think so... bripage Linux - General 4 09-11-2002 05:55 PM
running outta ideas digital bots Linux - Newbie 3 03-02-2002 01:05 PM

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

All times are GMT -5. The time now is 07:28 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