Common Commands for Linux Debugging

Time:2022-11-22

1. Use curl to output the whole process of communication for debugging

curl -v https://www.example.com

Notes: curl is a file transfer tool that uses URL rules to work on the command line. It supports uploading and downloading of files, so it is a comprehensive transmission tool, but according to tradition, it is customary to call curl a download tool. Supports HTTP, HTTPS, FTP, and also supports POST, cookies, authentication, downloading partial files from a specified offset, user agent string, speed limit, file size, progress bar, etc.

2. Configure routing for ubuntu system

Delete the default routing configuration with network interface enxf8e43b376055

route del -net default dev enxf8e43b376055

Add a new routing configuration for network interface enxf8e43b376055

sudo route add -net 10.0.0.0/8 gw 10.10.86.1 dev enxf8e43b376055

It means to add a routing configuration for the current host to 10.0.0.0 with a subnet mask of 255.0.0.0. The router passed is 10.10.86.1