Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-25-2001, 01:17 PM   #1
Registered: Sep 2001
Posts: 30

Rep: Reputation: 15
Renaming computer and alias questions

Does anyone know how to rename your computer not only the hostname but for example

[yourname@hostname yourname]$



thats how I want my terminal window to look just the hotname and everytime I log on... also to add to the alias for example:

alias s='exec startx -- -depth 24'

but everytime I start a new session the alias goes back to its default does anyone know how to keep your alias that you define??? so that everytime you log in you have the same alias ...

Old 09-25-2001, 01:58 PM   #2
Registered: Jun 2001
Location: Centralia, WA
Posts: 274

Rep: Reputation: 31
I assume you just want to change the prompt and that your hostname is already set, correct? If so, just edit your $HOME/.bash_profile and add export PS1="\h$ " this will give you hostname$ . You can make the $ a : if you like.
Edit the $HOME/.bashrc file and put your aliases in there and everytime you login your alias will execute or be available for use.
Old 09-25-2001, 05:23 PM   #3
Senior Member
Registered: Jun 2001
Posts: 1,635

Rep: Reputation: 45
check in the /etc directory - there should be a file in there called "hostname" or "HOSTNAME" or something like that. it should contain one word - predictably enough, the hostname. feel free to change it to whatever you wish.
Old 09-25-2001, 09:44 PM   #4
Registered: Sep 2001
Posts: 30

Original Poster
Rep: Reputation: 15
OK here is whats going on now...

editing the .bash_profile file worked but only when i'm not in the KDE environment, so on my terminal I still see that [user@HOST user] and when i'm not on KDE when I'm logged in but not using KDE only the Host: is there which is what I wanted.. why doesnt it do it for Terminal though??
Old 07-20-2004, 01:39 PM   #5
Registered: Jun 2004
Distribution: Turtle Kevux 0.8.8
Posts: 129

Rep: Reputation: 15
Thumbs up


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Alias question (2 commands for one alias) gflores Linux - Newbie 3 01-21-2006 01:40 AM
Apache Alias questions xemous Linux - Networking 1 08-21-2005 09:04 AM
Help with renaming machine MbowerARA Linux - General 5 07-29-2005 06:23 PM
Need help with renaming jpgs joe_stevensen Programming 2 06-26-2004 05:29 AM
Renaming my computer Rakin Linux - Newbie 1 02-09-2003 12:53 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:46 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration