LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 05-14-2018, 04:40 PM   #1
linuxuser7
Member
 
Registered: Apr 2018
Location: Ohio, USA
Distribution: openSUSE Tumbleweed, Ubuntu 18.04, Scientific Linux 7.5
Posts: 72

Rep: Reputation: Disabled
Sudo is unable to resolve host name


I installed Linux Mint where I gave the computer a name that I later became unhappy with so I went into Settings ---> Details and changed the name of my computer. Now whenever I do

Code:
sudo apt install program_name
I get a message

Code:
sudo: unable to resolve host computer_name
It does let me enter my password and does work, but how can I get sudo to resolve my computer name?
 
Old 05-14-2018, 06:53 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,502

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
I'd suggest you look at the Ubuntu page below as I expect it will be the same with Mint. Make sure you have the correct name in both files mentioned.

http://ubuntuhandbook.org/index.php/...me-ubuntu1404/
 
2 members found this post helpful.
Old 05-14-2018, 07:04 PM   #3
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Just as an aside, you don't actually need to prefix the apt command with sudo.

apt install program_name should work fine.
 
Old 05-14-2018, 08:36 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Tell us output of sudo hostname
 
Old 05-15-2018, 12:19 AM   #5
linuxuser7
Member
 
Registered: Apr 2018
Location: Ohio, USA
Distribution: openSUSE Tumbleweed, Ubuntu 18.04, Scientific Linux 7.5
Posts: 72

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
Tell us output of sudo hostname
unable to resolve host
 
Old 05-15-2018, 12:27 AM   #6
linuxuser7
Member
 
Registered: Apr 2018
Location: Ohio, USA
Distribution: openSUSE Tumbleweed, Ubuntu 18.04, Scientific Linux 7.5
Posts: 72

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
I'd suggest you look at the Ubuntu page below as I expect it will be the same with Mint. Make sure you have the correct name in both files mentioned.

http://ubuntuhandbook.org/index.php/...me-ubuntu1404/
Thank you! I followed the directions and it worked!
 
  


Reply



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
fixing sudo 'unable to resolve host' error leads to various questions regarding hostname sneakyimp Linux - Server 1 02-08-2017 04:27 PM
'sudo -i' and resolve host brownflamigo1 Linux - General 11 03-13-2011 08:43 AM
sudo works, but says 'unable to resolve host' Daravon Linux - Networking 4 09-08-2008 11:39 AM
unable to resolve host in ubuntu 8.04 pdelcast Linux - Networking 6 07-25-2008 06:01 PM
Unable to resolve host name MistaT Linux - Server 5 07-16-2007 04:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 03:50 AM.

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