How to edit the Linux hosts file
ฝัง
- เผยแพร่เมื่อ 14 ก.ค. 2024
- In this video, we'll guide you through editing the Linux hosts file. Learn how to access and modify the hosts file to control the mapping of hostnames to IP addresses. Our step-by-step guide will help you navigate the Linux environment and locate the hosts file. Understand the basic syntax and parameters of the hosts file, and how to add, edit, or delete entries. Start editing your Linux hosts file today and take control of your network configuration. Read more like this: www.techrepublic.com/topic/de...
Commands:
sudo nano /etc/hosts
ping invoiceplan
invoiceplane
invoiceplane/invoiceplane
EDITOR'S NOTE: This content was originally published in July 2023 on TechRepublic. This information may be outdated depending on time of viewing.
Footage courtesy of TechRepublic.
➤ CHAPTERS
0:00 - Intro
0:32 - Tutorial
2:05 - Watch more videos!
Original article:
Written by: Jack Wallen
Hosted by: Jack Wallen
Edited by: Miguel Potestades
➤ OUR WEBSITE:
techrepublic.com/?...
➤ MORE VIDEOS: techrepublic.com/videos/?utm_...
➤ LINKEDIN: / techrepublic
➤ TWITTER: / techrepublic
➤ FACEBOOK: / techrepublic
➤ FLIPBOARD: flipboard.com/@TechRepublic - แนวปฏิบัติและการใช้ชีวิต
Read more developer related topics and tutorials at TechRepublic: www.techrepublic.com/topic/developer/
This is great for SSH and SFTP connections as well. I can't believe that I only recently learned about the hosts file (ironically on Windows which works the same by the way). I have 2 Linux machines on my home network which I manage through remote terminal and I was always manually typing in the IP but now I just assign host names on the local file (of course make sure that the host you're mapping is set to a static IP or it will eventually stop working).