How to Change a Computer Name in Terminal
- 1). Open the System menu on your Linux computer and click on the Terminal application.
- 2). Type "su", press "Enter", type in your administrative password and press "Enter" again.
- 3). Type "hostname new_computer_name" where "new_computer_name" is the new name you want for your computer.
- 4). Press "Enter" and the name change is complete.
Source...