Linux - NewbieThis 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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Originally posted by digiot Welcome to LQ and Use the Search, Luke! There's a thread about 'What's your prompt look like' and many many references to configuring the prompt besides that.
Also a compiling guide somewhere - I forget where - maybe in the Linux Answers section.
-- Oh, that was one question. You don't 'compile' your PS1 string - you just edit the file. You compile source code to produce binaries.
yeah, you are right .
But I have done it ,and I have read the torpic of the 'What's your prompt look like'. I spend some time on it ,but I can't undestand any code yet ! So I don't know what should I do . I have used the " alias ls= 'ls --color' to change my LS display ,and it worked well. In my ROOT home directory , I can't find the '.bashrc' file, and I have readed the /etc/DIR_COLORS and /etc/profile.d/ *.sh , I don'd know how to do it ! Crying
My system is redhat9, I need your help, please give me details.
let me tell you what has hapened, when I upgraded my openoffice, I have used the "openoffice--repair " tools to uninstall it and then install the newest one, which is version 1.1 you know . But it didn't work with my wish and some bad things hapened , when I reboot my system, and ran the terminal , the prompt has changed form "[root@www root]" to "bash-2.05b$" ,but I don't like this style . In the home directory there are usually some files such as .bashrc .dir_color etc. but I could't find them after I upgraded my openoffice.
Originally posted by tommytomato Yes i get your point.
I have not had to change my host name via the linux command line yet.
I know its hard, but you may have to read and learn how to use the command line.
these links should get you started with linux, it wont happen over night.it took me three months before it made sence to me.
Not sure about the open office stuff and tommytomato's probably got you covered (so this post may be pointless), but I see how that thread I referred to (yep, that was it, tommytomato) wouldn't make much sense without context. If less is your manpager (and maybe otherwise) you can do 'man bash' and then hit the slash key (/) and type PROMPTING and it'll define all those variables. You just plug them in how you want them.
Try 'man hostname' if you want to do something with that - I usually just set it during the install and don't pay much attention after that but it seems like I did change it before.
As far as not having a .bashrc (or a .bash_profile), it's not required, in that /etc/profile takes care of base initialization. But it's just a plain text file - create it and add in your prompt strings, aliases, functions, other environmental variables. Other than functions, it's not really 'programming' and nothing too hard - basically you're just saying 'I want *this* to mean *that*.' Like I change to /var/log/packages a lot and that's a bit to type and tab completion isn't perfect, and there is no 'cdp' command. So I can 'make' one by saying 'alias cdp='cd /var/log/packages''. Now that I've told bash what it 'means', when I type 'cdp', bash 'translates it' to 'cd /var/log/packages'. And like with the prompt string - I'm saying I want PS1 to be equal to 'string', and the string, in turn, is made up of more variables - part of my prompt string is '\w' which just means to display the present working directory in the prompt. Like that.
Never heard of a Linux program clobbering files like that, though. Might want to make a ~/.bashrc and do 'cp .bashrc .bashrc.mybak' so that you have a pretty unclobberable backup. Some text editors make them anyway, depending on the default setup, but those can get overwritten in turn.
Originally posted by digiot Not sure about the open office stuff and tommytomato's probably got you covered (so this post may be pointless), but I see how that thread I referred to (yep, that was it, tommytomato) wouldn't make much sense without context. If less is your manpager (and maybe otherwise) you can do 'man bash' and then hit the slash key (/) and type PROMPTING and it'll define all those variables. You just plug them in how you want them.