|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
.bashrc file
Hi experts, I am using bash shell and I cant find any .bashrc file in my home dir. Can anybody please help me out here.... If .bashrc file is not there, from where my shell config operates? Also I want to set my prompt like... Code:
[server:working_dir]$ Please advice. |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
There must be a system-wide .bashrc somewhere (may be in /etc) that will server as default bashrc if not present in your home directory. For your prompt, add this line in the .bashrc from your home directory: Code:
PS1='[\h:\w]$ ' |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
To add this code in .bashrc file, I need to create it first...
can you please show me how can I create it? format? |
|
#4
|
||||
|
||||
|
Code:
echo 'PS1=\'[\h:\w]$ \'' > .bashrc Or just: Code:
<favourite editor> .bashrc then type what you wish in there |
| Sponsored Links | |
|
|
#5
|
||||
|
||||
|
Hi. On Linux systems there are files often used as sources for new account (login) creations. On the system: Code:
OS, ker|rel, machine: Linux, 2.6.26-2-amd64, x86_64 Distribution : Debian GNU/Linux 5.0 the .bashrc file is at: Code:
/etc/skel/.bashrc It's about 100 lines and should be a good start. Best wishes ... cheers, drl |
| Sponsored Links | |
|
|
#6
|
||||
|
||||
|
Quote:
---------- Post updated at 04:29 PM ---------- Previous update was at 04:23 PM ---------- Quote:
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how do i look for my .bashrc file | npatwardhan | Shell Programming and Scripting | 12 | 01-28-2009 01:43 PM |
| Can I modify the .bashrc file instead of .profile file to customize my login? | Hyunkel | Shell Programming and Scripting | 1 | 09-25-2007 08:37 PM |
| .bashrc file is an initialization file run by each interactive invocation | cy163 | UNIX for Dummies Questions & Answers | 1 | 05-23-2007 10:27 AM |
| from bashrc to sh..?? | moxxx68 | Shell Programming and Scripting | 3 | 09-13-2004 05:39 AM |
|
|