LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Bash? Get me outta here! (https://www.linuxquestions.org/questions/linux-newbie-8/bash-get-me-outta-here-6195/)

Timato 09-03-2001 06:57 PM

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.

DMR 09-03-2001 11:56 PM

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.

isajera 09-04-2001 12:25 AM

typing "exit" will get you out of most shells.

Timato 09-04-2001 12:38 AM

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.

isajera 09-04-2001 12:54 AM

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.

DMR 09-04-2001 05:51 PM

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.

Timato 09-04-2001 10:33 PM

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.

DMR 09-05-2001 01:40 AM

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".


All times are GMT -5. The time now is 08:19 PM.