IP

Alexkaplan2003

New Member
Joined
Aug 30, 2021
Messages
6
Reaction score
0
Credits
37
question1.JPG
 


The simple way is: ;)
Code:
[user@localhost ~]$ hostname -i
x.x.x.x
 
It's CentOS?
Actually, if you're experiencing issues or you are likely getting your loopback IP. (127.0.0.1) it might be due to you not being able to resolve your hostname and it defaulting to loopback.

You can add your actual IP and hostname to /etc/hosts and then it will resolve correctly.

My Raspberry Pi that I used to use as a VPN server has this in it's hosts file.
Code:
127.0.0.1         localhost
::1               localhost ip6-localhost ip6-loopback
ff02::1           ip6-allnodes
ff02::2           ip6-allroutes
192.168.55.90     pivpn
When a DNS server cannot resolve your machine's name, it looks at the /etc/hosts to resolve it. Many times if you don't update the /etc/hosts file with the actual hostname and an IP. It will resolve the loopback adapter (lo) and localhost.
 
A, I presume. We don't generally do homework, however.
 
A, I presume. We don't generally do homework, however.
Then I seriously threw a wrench into his multiple choice options lol.
 
Then I seriously threw a wrench into his multiple choice options lol.

If I read it correctly, they just want to print the IP address and nothing else. So, that'd be A. B has the wrong network interface name.

I figure this may not be homework but some online quiz they were doing. It oozes of a gaudy online quiz, so I'm hoping it wasn't homework.
 
If I read it correctly, they just want to print the IP address and nothing else. So, that'd be A. B has the wrong network interface name.

I figure this may not be homework but some online quiz they were doing. It oozes of a gaudy online quiz, so I'm hoping it wasn't homework.
It's not a homework, it's exam question
 
I am studing Linux for my own interest. I am not actually considering to work in this field
 
We generally don't help with those, either. You should know what you're doing if it's a course or exam. We don't want inept people entering the industry. It's okay to ask for help, but show your own work and effort first.

Ah well... Yeah, the answer is A. Well, it should be A.
 
We generally don't help with those, either. You should know what you're doing if it's a course or exam. We don't want inept people entering the industry. It's okay to ask for help, but show your own work and effort first.

Ah well... Yeah, the answer is A. Well, it should be A.
It's a low possibility for me to enter the industry after this course
 
LOL Well, if you want to, next time let us know that you're studying and then tell us what you've tried so far to solve the problem. We like it when you put some effort in, especially if you're studying formally. Then again, we like it when everyone puts some effort in.
 

Members online


Latest posts

Top