Home > English, Tech Crunch > HOWTO Rename a Debian system

HOWTO Rename a Debian system

This article was first written in December 2004 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/192).

To rename a Debian system, it is not enough to change the /etc/hostname file, you probably need to change some references to the old name elsewhere. This article tries to pinpoint the files where it would be needed to change it. Be careful, the name may also be configured in specific applications, like in some databases.

System files, where changes are mandatory

  • /etc/hostname
  • /etc/hosts
  • /etc/mailname
  • Configuration files for the MTA used

Application files, depending on the program

It is not possible to list every possible application configuration file where the name may have been hardcoded. So the simplest way to detect them is to do the following:

# rgrep -i oldname /etc/*

where oldname is the previous hostname.

And of course, don’t forget to change the name references on other machines of the network also, where it applies.

Categories: English, Tech Crunch Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: