Change Computer Name

 
Thread Tools Search this Thread
Operating Systems OS X (Apple) Change Computer Name
# 1  
Old 03-01-2007
Change Computer Name

I am trying to change my computer name (located in system prefs-> sharing) using unix

i've tried

Code:
Macbook-Pro:~ user$ hostname
Macbook-Pro.local
Macbook-Pro:~ user$ sudo hostname hello
Password:
Macbook-Pro:~ user$ hostname
hello

It seems to work, but my computer is still called "Macbook-Pro" in system prefs->sharing, even after reboot. When I reboot and run "hostname" i get Macbook-Pro.local again.

Any ideas?
# 2  
Old 03-03-2007
solved my own problem

user plist buddy (more info at http://www.dreness.com/blog/archives/6)

the plist containing the computer and hostname is located /Library/Preferences/SystemConfiguration/preferences.plist

you may need to change the permissions of that file first before you can edit its contents, and also it requires configd to be restarted (either from the command-line or reboot the computer).

Last edited by CBarraford; 03-04-2007 at 01:55 AM..
# 3  
Old 03-04-2007
found an even better way of doing it

Code:
sudo scutil --set ComputerName "newcompname"
sudo scutil --set LocalHostName "newhostname"

this is much smoother than editing the plist manually and does not require any restarts of any kind, the mac does it all for you.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. What is on Your Mind?

How to become more confortable on my computer?

Hi all, Lately I have being practicing several ways to improve on the amount of time i spend reading and coding on my computer. I realized that it can be very tiring and hard work. The had work needed and time is not the main issue here. The issue is do i start of by spending at least one -- two... (3 Replies)
Discussion started by: despiragado
3 Replies

2. SCO

How to change raid controller driver ? (hardware change)

Hello I'm trying to virtualize an instance of Sco Unix 5.0.5 in VirtualBox (called VM-A) , but sco I have problems set to launch with the new raid controller . The physical machine has a raid controller adaptec (alad driver) but VirtualBox uses buslogic (blc driver) What ... (3 Replies)
Discussion started by: flako
3 Replies

3. Shell Programming and Scripting

Change the content of files but not change the date

I have 100 files in a directory , all the files have a word "error" and they are created in different date . Now I would like to change the word from "error" to "warning" , and keep the date of the files ( that means do not change the file creation date after change the word ) , can advise what can... (7 Replies)
Discussion started by: ust3
7 Replies

4. Shell Programming and Scripting

Change the content of files but not change the date

I have 100 files in a directory , all the files have a word "error" and they are created in different date . Now I would like to change the word from "error" to "warning" , and keep the date of the files ( that means do not change the file creation date after change the word ) , can advise what can... (0 Replies)
Discussion started by: ust3
0 Replies

5. What is on Your Mind?

What was your first computer?

Hey, the What Do You Do for a Living thread got me thinking about this. My first "computer" was a Timex Sinclair that I built from a kit. I also spent many hours painstakingly programming a Commodore Vic20 to display graphics and sound (and save them on that slooooow tape drive). My first "real"... (26 Replies)
Discussion started by: dday
26 Replies

6. UNIX for Advanced & Expert Users

who - PC Computer name

Does anyone know of a way of identifying the PC / client name rather than IP address via who or some other AIX command (5.3). (4 Replies)
Discussion started by: gefa
4 Replies

7. Shell Programming and Scripting

Another customisation for my computer

Hey, this time, I want my rhythmbox to play a different playlist at a set time (about sleeping time). my shellcode works, since if i run it it works, but when i make crontab run it, nothing happens. I try appending commands to the code, such as cp a file, and that occurs, so I have no idea what is... (1 Reply)
Discussion started by: davidY
1 Replies

8. Programming

getting computer name

Hi all! Is there any function to get the name from a computer by the IP adresse? Thank you in advance! Greetings Mario (2 Replies)
Discussion started by: coredump2003
2 Replies

9. Filesystems, Disks and Memory

how do you get 2 windows off your computer

i have windows 2000 professional and windows 98 on my computer but i onle want 1:confused: (3 Replies)
Discussion started by: binary_king
3 Replies

10. IP Networking

I cant network my computer

I have an Octane2 running IRIX 6.4 . The problem is that the machine is not coming on the network . I have put in all the details perfectly , like IP , netmask , name servers , gateway IP , I tried it on a Mac alongside me but On the IRIX it dosent work . I have no idea wats the prob lem .... (2 Replies)
Discussion started by: Jai
2 Replies
Login or Register to Ask a Question