•  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

  • 頂部會計軟件
  • 最佳開源電子郵件服務器
  • 尋找2個CPU 32GB RAM的專用服務器(僅歐盟)
  • 前6工具搜索對於內存在Linux下
  • 免費遊戲專用服務器託管
  • Whitelisting Edge Server IPs
  • WebSocket Intro
  • The Ultimate Gaming Experience with Psychz Networks Game Servers!
  • Starting a Web Hosting Reseller Business
  • Psychz Features & Product Update For October 2023
  • IP Justification Template
  • Disable force password change feature
  • Chicago Colocation Pricing
  • Cheap Dedicated Server For Virtualization
  • setup hourly crontab
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