# Unix setup, set prompt



## clogan1981 (Jan 16, 2006)

Im trying to customize my OSX Terminal a little and change the prompt, however its not letting me change it with all the articals i found on google. so far i've tried to create a file in Users/Username called .tcshrc and .cshrc with a line in it like "set prompt="$dir#"" and its not working so far. Has anyone gotten this to change or know the file and directory which i need to edit to get the prompt.

Im running 10.4.4


----------



## sinclair_tm (Mar 11, 2005)

ya, i've done it. got my info from the book "learning unix of mac os x tiger" by dave taylor. great book for an intro to unix. this is what he says on the subject, and what i did:


> Use the _vi_ editor to create a file called _.profile_ in your home directory _(/Users/yourname)_, and then add the following to the end of the file: *export PS1="$ "*.


i found this file was in my home folder allready, so i just added


> export PS1="\w \$ "


 to the end of it so that it only showed the working dir. because i'm nice, here are most of what you can do with the prompt.


> \w the current working directory
> \W the trailing element of the current working directory, with ~ substitution
> \! the current command history number
> \H the full hostname
> ...


and if you just enter text between the double quotes ( ie "_text here_") then it will display that text.
hope this is helpful.


----------



## shuuhen (Sep 4, 2004)

The reason .tcshrc and .cshrc do not work for you is Mac OS X 10.3 and later use bash as the default shell. Those configuration files you created will work with the tcsh shell (the default on previous versions of Mac OS X). bash has other configuration files, but you probably will only need to use .profile (at least until you get farther into shell configuration).

You will set up your shell prompt with PS1, like sinclair's post shows.


----------



## pat13nce (Jan 20, 2006)

I just started reading.

Mac OS X Tiger Edition
"A Practical Guide to UNIX for Mac OS X Users"
By: Mark G. Sobell & Peter Seeback

I was getting tired of the tech guys playing the fun roll with me. Talking Darwin this and ls that.

I am only on chapter 3 and I realize alot more then I even thought of before.

The simplest thing as naming of files can be a real pain once you jump into the terminal world.

I have our whole network working with alpha, number, "_", amd "-" for naming of files. NOTHING ELSE...

So amny people on the same server sharing files with naming with"•" and "*" just to get it to go to the top.

OMG I am just so glad it wasn't me naming files like that.

IT almost went through the roof when they looked at the files.


----------

