Explore the Network

Linux lab Beginner 4 tasks 10 points

Get your bearings on this machine's network. Look at its interfaces and addresses, see what's listening, and add a name of your own to /etc/hosts. Editing /etc/hosts needs sudo; your password is student.

How it works: the terminal below is a real Linux machine running in your browser. Click it and type. Tasks tick themselves off as you complete them; questions are answered in the box under each task. Press Reset any time for a fresh machine. Your password on this machine (for sudo) is student.

student@vulntech:~ Starting…
Getting your Linux machine ready…
The first start downloads about 20 MB. After that your browser keeps it, and labs start in a moment.

Hints

ip -brief addr is the short, one-line-per-interface view.

An /etc/hosts line is the address first, then the name(s).

Solution explanation

ip -brief addr show lists the interfaces; this machine has only lo, the loopback, at 127.0.0.1. Adding 10.0.0.1 gateway.local to /etc/hosts creates a name the whole system can resolve, which getent hosts gateway.local then looks up — /etc/hosts is checked before any DNS server.

Show solution
ip -brief addr show
ip -4 -o addr show lo
echo "10.0.0.1  gateway.local" | sudo tee -a /etc/hosts
getent hosts gateway.local
HOME LEARN COMMUNITY DASHBOARD