Network and internet
Ports, DNS, IPs and calling APIs. 15 commands.
- Find and stop what's using a portFor when you see "address already in use" or "port 3000 is already taken".
- Find your IP addressYour local IP (on your home or office network) and your public IP (what websites see).
- Clear the DNS cacheWhen a site moved to a new server but your machine still goes to the old one.
- Call an API from the terminalAsk a web service for data with one command and see the answer straight away.
- Check a website's status codeSee the three-digit reply a web address gives, like 200 for fine or 404 for not found.
- Check latency with pingSee how long a message takes to reach a website and come back, in milliseconds.
- Check whether a port is reachableFind out if you can connect to a server on a given port, like a database or a website.
- Download a file from the terminalSave a file from a URL straight into the current folder.
- Download with wget: resume, many files or a whole folderwget picks up a broken download where it stopped, works through a list of links and can fetch a whole folder from a website.
- Look up a domain's DNS recordsSee where a domain points, its mail servers and what a specific DNS server says.
- Point a domain at your own machine (hosts file)Make a name like myapp.test open your local app, by adding a line to the hosts file.
- Restart your network connectionTurn the network off and on again from the terminal, and see what's using it.
- Run a local web serverServe the files in a folder at a localhost address, so you can open them in your browser.
- See which ports are open on your machineList every program listening for connections, with its port number.
- Test your internet speedMeasure your download and upload speed from the terminal.