LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I change my computer name in Mint 17.3 (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-change-my-computer-name-in-mint-17-3-a-4175572480/)

Hatman KZN 02-17-2016 07:49 AM

How do I change my computer name in Mint 17.3
 
When I installed Mint it automatically assigned rusty@rusty-300E4A-300E5A-300E7A-3430EA-3530EA as my computer name.
How do I change that?

153rd 02-17-2016 08:07 AM

Hey,

This guide gives some advice.
Open up the command line interface and follow the steps marked in yellow.
See if that works out.

Good luck!

BW-userx 02-17-2016 10:36 AM

hostname or HOSTNAME

in /etc

mod it

save it

bada bing new name

Hatman KZN 02-18-2016 01:48 AM

Hi BW.
My computer's name has always been Esmerelda so that is what it must be now.


When I type in:-


rusty@rusty-300E4A-300E5A-300E7A-3430EA-3530EA ~ $ hostname esmerelda in/etc

I get this:-

Program name:
{yp,nis,}domainname=hostname -y
dnsdomainname=hostname -d

Program options:
-a, --alias alias names
-A, --all-fqdns all long host names (FQDNs)
-b, --boot set default hostname if none available
-d, --domain DNS domain name
-f, --fqdn, --long long host name (FQDN)
-F, --file read host name or NIS domain name from given file
-i, --ip-address addresses for the host name
-I, --all-ip-addresses all addresses for the host
-s, --short short host name
-y, --yp, --nis NIS/YP domain name

Description:
This command can get or set the host name or the NIS domain name. You can
also get the DNS domain or the FQDN (fully qualified domain name).
Unless you are using bind or NIS for host lookups you can change the
FQDN (Fully Qualified Domain Name) and the DNS domain name (which is
part of the FQDN) in the /etc/hosts file.


What do I enter next?
--domain or --yp, --nis or something else?

153rd 02-18-2016 02:03 AM

What he means to say that in the folder /etc, there is a file named "hostname" ( you can check this by typing [ls /etc], this will show you all files in folder /etc)

By doing [nano /etc/hostname] in the CLI you can change the hostname into esmeralda.

What you're seeing when typing [hostname] is a description of the hostname-program.

good luck!

BW-userx 02-18-2016 05:45 AM

key word you missed in my post prior to this, mod it <-- short for modify it starting from
Code:

#nano /etc/hostname
you can name your computer anything you want. if it is not going up on the net to be a server, other wise it is first come first serve.

If you want to give it a middle name then use a dot between the two. but No ending .(anything)

you'll need to modify your /etc/hosts file for that.

hydrurga 02-18-2016 06:09 AM

Quote:

Originally Posted by BW-userx (Post 5502146)
key word you missed in my post prior to this, mod it <-- short for modify it starting from
Code:

#nano /etc/hostname
you can name your computer anything you want. if it is not going up on the net to be a server, other wise it is first come first serve.

If you want to give it a middle name then use a dot between the two. but No ending .(anything)

you'll need to modify your /etc/hosts file for that.

Newbies may not know the lingo, BW-userx. It's better to take your time and explain the steps and commands required.

Hatman KZN 02-18-2016 06:11 AM

When I type nano /etc/hostname in the CLI this is what I get.

GNU nano 2.2.6 File: /etc/hostname

rusty-300E4A-300E5A-300E7A-3430EA-3530EA





[ Read 1 line ( Warning: No write permission) ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell

When I delete rusty-300E4A-300E5A-300E7A-3430EA-3530EA
and type in Esmerelda I get


GNU nano 2.2.6 File: /etc/hostname Modified

Esmerelda








^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell

There is no button to save the change and the name has not been changed when I open the terminal again.




__________________________________
The more I learn, the dumber I get

153rd 02-18-2016 06:15 AM

What the CLI says is that your user(type) doesn't have the permissions to write to the /etc/hostname file.

You can fix this in two ways:
-change the permission
-enter sudo mode

It's better to use sudo in this case.

so type [sudo nano /etc/hostname]. When you've made your changes, press (ctrl) X, and confirm your changes by typing 'y'.

BW-userx 02-18-2016 06:17 AM

Quote:

Originally Posted by hydrurga (Post 5502156)
Newbies may not know the lingo, BW-userx. It's better to take your time and explain the steps and commands required.

how does a child learn to speak the native language?
by having it spoken to them - repeatedly
but I understand your point :D
cheers !

hydrurga 02-18-2016 06:18 AM

Quote:

Originally Posted by BW-userx (Post 5502169)
how does a child learn to speak the native language?
by having it spoken to them - repeatedly
but I understand your point :D
cheers !

:D No problem.

BW-userx 02-18-2016 06:22 AM

Quote:

Originally Posted by Hatman KZN (Post 5502159)
When I type nano /etc/hostname in the CLI this is what I get.

^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell

There is no button to save the change and the name has not been changed when I open the terminal again.


the
Code:

^
represents the
Code:

Ctrl key
the letter represents the key you have to use along with the Ctrl key to get it to do what it says it does by pressing them two keys together.

example:

to get it to remove text using cut, place your cursor at the start of what you want to remove. then press ^K - meaning Crtl+k it will cut it out, if you want to take a block of text and move it somewhere else. Just keep cutting it,then place your cursor where you want your block of text you just cut out, then press ^U - Ctrl+U it will paste all of it at once.


save it ^X - Crtl+x then follow the prompts beacuse it will give you a confrimation message.

Quote:

__________________________________
The more I learn, the dumber I get
NO!
the more you learn about Linux the more you find out their is more to learn.

example:

NANO:
Code:

nano -c /path/filename
placing the -c before the path to your file you want to create, or modify, this will tell nano to show column and line numbers.

So if you're compling code and you get an error saying something like.

error line 596 blah blah blah in file.c

just use nano -c this way you can page down and find line 596 to see what it is talking about.

just press ^C then type in the line number hit enter and you're there.



K = Cut with a K
U = UnKut or Uncut
X = means exit using the x - e is slient

It is set up like Windows to a certin point. Being standardized in commands. In Windows Ctrl+x is cut, Ctrl+C is copy, Ctrl+V is paste. it is a standard format for everything in Windows, F1 is help in everything. When you're prgramming you only have so many key combo's to pick from. doing it the same way accross the board means less confustion. hence standards was issued.

ANSI:
Quote:

The American National Standards Institute (ANSI, /ˈænsiː/ AN-see) is a private non-profit organization that oversees the development of voluntary consensus standards for products, services, processes, systems, and personnel in the United States.

Hatman KZN 02-18-2016 06:48 AM

You are right Hydrurga.
We Newbies definitely do not know the lingo.
Most of it is gobbledy-geek to us or may I be so bold as to say "geekspeak"

I an going on 80 years old and a lot of what I learn today is forgotten tomorrow.
So the "Select - click on - type blah blah blah - Enter" method works best for me.

Please forgive me BW-userx but when I first read your post I thought that you had been smoking controlled substances.
It was the bada bing bit that did it.
No offence meant. Just trying to point out how geriatric brains work. (or don't)

Back to the problem at hand.
Where to now Horatio?

BW-userx 02-18-2016 07:00 AM

Quote:

Originally Posted by Hatman KZN (Post 5502188)
I an going on 80 years old and a lot of what I learn today is forgotten tomorrow.
So the "Select - click on - type blah blah blah - Enter" method works best for me.

Please forgive me BW-userx but when I first read your post I thought that you had been smoking controlled substances.

It was the bada bing bit that did it.

No offence meant. Just trying to point out how geriatric brains work. (or don't)

Back to the problem at hand.
Where to now Horatio?

With all due respect but,you're going on 80 and you do not know the reference to the bada bing slang prase?

Bada Bing Bada Boom is something Frank may have said.

Quote:

Bada bing, bada boom
A term commonly used by members of the Mafia.
Slang for, "it's finished; taken care of."
Often it is heard in the metropolitan
areas of New York, specifically Brooklyn.
and a lot of movies one may watch.

that was just my version of short hand.

whereas a lot of people give way too much information on a simple fix. In how to's.

it still forces the mind to hopefully be stimulated into thinking in the right direction using just key words.

hostname - what you need to find
/etc - where it is at
mod it - what to do with it
save it - what to do with it when you're done with it
bada bing new name - what happens as a result of your proper actions towards the file.

short and simple. :D

one never knows how much the other knows or does not know, even if they say they are a newbie, and it never hurts to inquire further if more information is needed.

Hatman KZN 02-18-2016 07:39 AM

Heh-heh.
I live in the southern part of Africa and your Mafia expressions are not very common here.(A tad far from NY.)
We also do not have Mafiosa. We have Tsotsis.
A totally different breed. Much more primitive.

So to me you sounded more like a Rastafarian Jamaican doing Reggae.

Jokes aside. I appreciate your help and will try to make sense of what you and Hydrurga have said.

May the force be with you (that one I do know)



__________________________________________
Of all the things I've lost, I miss my mind the most


All times are GMT -5. The time now is 11:04 AM.