•  Home
  •  Dashboard
  •  Company
    • About Us
    • Blog
    • Careers
    • Contact Us
    • Data Centers
    • Looking Glass
    • Network
    • Reseller
  •  Hosting Services
    • Infrastructure
      • iColocation
    • Compute
      • cMetal
      • cVirtual
    • Storage
      • sObject
      • sBlock
    • Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • Protection
      • pBackup
      • pDDoS
  •  Solutions
    • Ecommerce
    • Finance
    • Gaming
    • Hosting
    • Management
    • Security
    • System Integrator
  •  Support
    • Community
    • Knowledge Base
    • Open A Ticket
  •  USA & Canada: 800-933-1517
  •  International: 626-549-2801
  •  Email: sales@psychz.net
  • Services
    • new-colocation-header-img
      Infrastructure
      • iColocation
    • new-compute-header-img
      Compute
      • cMetal
      • cVirtual
    • new-storage-header-img
      Storage
      • sObject
      • sBlock
    • new-networking-header-img
      Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • new-protection-header-img
      Protection
      • pBackup
      • pDDoS
  • Solutions
    • Ecommerce
    • Security
    • Gaming
    • Hosting
    • Management
    • Finance
    • System Integrator
  • Dashboard

Sudo无法解析主机

  • Home
  • Client
  • Qa Forum
  • Sudo无法解析主机

Posted By: michael | 1 Replies | Last Reply On: May 31, 2017 01:01:34

码头被卡在 -

sudo:无法解析主机(无)

 

Psychz - Nikhil

Votes: 0Posted On: May 31, 2017 01:01:34
 

当终端停留在“sudo:无法解析主机(无)”时,表示您没有为系统提供主机名。主机名是网络识别的设备的名称。主机名存储在文件“/ etc / hostname”中。它被映射到网络进行通信。


疑难解答“sudo:无法解析主机(无)”

1.通过在终端上运行命令“hostname”来检入您的主机名。结果将为空,因为没有分配主机名。

2.编辑主机名存储在系统中的“/ etc / hostname”文件。提供您选择的任何主机名。举个例子,我分配了主机名为“inspiron-3558”。您可以使用以下命令来编辑文件。
(注意:您需要root权限才能编辑文件)

vi / etc / hostname 

(注意:在这种情况下,我们使用“vi”编辑器编辑文件,但您可以选择任何您喜欢的文本编辑器。)

3.使用新的主机名保存文件后,运行命令“hostname”进行确认。新的主机名应显示在屏幕上。

4.检查“/ etc / hosts”文件,并编辑与“/ etc / hostname”相同的主机名。 “hosts”文件将主机名映射到IP地址。因此,编辑文件中的主机名非常重要。请编辑使用IP地址“127.0.1.1”映射的主机名。

5.在系统重新启动之前,文件中所做的任何更改都不会生效。因此,请重新启动系统以使更改生效。

6.重新启动后,检查“sudo”命令,确保它正常工作。

Was this reply helpful?

Related topics

  • 科学Linux和其功能
  • 数据中心照片
  • 努力促进全球宽带接入赚不了多少班次
  • 专用未计量cPanel和1 Gbps端口
  • 专用服务器报价
  • sBlock - iSCSI Windows Guide
  • Why AT&T-Time Warner Merger Is Bad News for Everyone
  • Tools That Make Kubernetes Easier
  • Secure Token Integration For PHP
  • Rsync两个目录
  • Psychz Networks Launches New Data Center in Moscow, Russia
  • How to register a domain name with DNS service?
  • Create Cache Path
  • Change Logs
  • AWS DDoS保护
Copyright © 2025 Psychz Networks,
A Profuse Solutions Inc Company
Hosting Services
Infrastructure
  • iColocation
Compute
  • cMetal
  • cVirtual
Storage
  • sObject
  • sBlock
Networking
  • nCDN
  • nIP Transit
  • nWavelength
Protection
  • pBackup
  • pDDoS
Company
  • About Us
  • Blog
  • Careers
  • Contact Us
  • Data Centers
  • Looking Glass
  • Network
  • Reseller
Policies
  • Acceptable Usage Policy
  • Privacy Policy
  • Service Level Agreement
  • Terms and Conditions
Support
  • Community
  • Knowledge Base
  • Open A Ticket
Get In Touch
  • Psychz Networks,
    A Profuse Solutions Company
    611 Wilshire Blvd #300
    Los Angeles,California 90017
    USA
  • US/Canada: 800-933-1517
  • International: 626-549-2801