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

Terminal ติดอยู่ -

sudo: ไม่สามารถแก้ไขโฮสต์ (ไม่มี)

 

Psychz - Nikhil

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

เมื่อ terminal ติดอยู่ใน "sudo: ไม่สามารถแก้ไข host (none)" ได้หมายความว่าคุณไม่ได้ระบุชื่อโฮสต์ไว้ในระบบของคุณ ชื่อโฮสต์คือชื่อของอุปกรณ์ที่เครือข่ายระบุด้วย ชื่อโฮสต์ถูกเก็บไว้ภายในไฟล์ "/ etc / hostname" ถูกแม็ปกับเครือข่ายเพื่อการสื่อสาร


การแก้ไขปัญหา "sudo: ไม่สามารถแก้ไขโฮสต์ (ไม่มี)"

1. ตรวจสอบชื่อโฮสต์ของคุณโดยการรันคำสั่ง "hostname" บนเครื่องของคุณ ผลลัพธ์จะว่างเปล่าเนื่องจากไม่มีการกำหนดชื่อโฮสต์

2. แก้ไขไฟล์ "/ etc / hostname" ที่ชื่อโฮสต์ถูกเก็บไว้ในระบบของคุณ ระบุชื่อโฮสต์ตามที่คุณต้องการ ตัวอย่างเช่นฉันได้กำหนดชื่อโฮสต์เป็น "inspiron-3558" คุณสามารถใช้คำสั่งต่อไปนี้เพื่อแก้ไขไฟล์
(หมายเหตุ: คุณจะต้องได้รับอนุญาตจากรากเพื่อแก้ไขไฟล์)

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

  • How To Run Kubernetes on Psychz Networks Bare Metal Servers
  • BBR: วิธีใหม่ในการเพิ่มความเร็วของอินเทอร์เน็ต
  • sBlock - Backup on RHEL, CentOS, AlmaLinux & Rocky Linux
  • How to setup a dedicated server for Conan Exiles
  • sBlock - Backup on Debian, Ubuntu and Related OS
  • Deploy Psychz Dedicated Server Using Jenkins Pipeline Scripts
  • เซิร์ฟเวอร์เดสก์ท็อประยะไกล
  • วิธีการโฮสต์เว็บไซต์บนเซิร์ฟเวอร์ Dedicated?
  • ด้านบนแผงควบคุม Hosting สำหรับลินุกซ์
  • ซับเน็ตมาสก์ทำงานอย่างไร
  • การป้องกัน DDoS แบบป้องกันไวรัส
  • Top Five โอเพนซอร์สซอฟต์แวร์สำรองข้อมูลสำหรับลินุกซ์
  • Price Match Promise: How to Secure the Best Deal on Dedicated Servers in Multiple U.S. Locations
  • History of Internet
  • DDoS Protection for Dedicated Servers
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