课程: Linux System Engineer: Networking and SSH
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Edit system hosts file
- [Instructor] The Etsy host file is the simplest way to provide name resolution and is super easy to edit. You'll need to be in Root to do it, though. First let's get our IP address. In the terminal type in IP space addr space show and hit Enter. We can see that my IP address is 192.168.0.19. Now let's edit the Etsy host file using VI. Type in clear and then type in sudo space VI slash etc slash hosts and hit Enter. If you prompts you for a password, enter it now. We're going to go into insert mode by pressing the I key, and then we'll go to the end of the line and hit Enter. Now let's add our IP address 192.168.0.19 here. Substitute this with your IP address on your machine. The syntax has a left-hand column with an IP address and then other columns for the names to resolve. You can put a host name in here, a fully qualified domain name, or both. Let's add in mydomain.com, and let's save this by pressing Escape, colon, X, and hitting Enter. Now pinging this domain, ping space…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。