Common commands for Linux debugging

Time:2022-6-20

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 works from the command line using URL rules. It supports file uploading and downloading, so it is a comprehensive transmission tool. However, traditionally, curl is called a download tool. Support HTTP, HTTPS, FTP, post, cookies, authentication, downloading some files from the specified offset, user agent string, speed limit, file size, progress bar and other features

2、 Configuring routes for Ubuntu systems

Delete the default routing configuration with the 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

This means that a route configuration with a subnet mask of 255.0.0.0 and a route to 10.0.0.0 is added to the current host. The router passed is 10.10.86.1

Recommended Today

Drawing dynamic clock with canvas

Draw a dynamic clock as shown in the following figure <body><canvas width=”600px” height=”600px” style=”background-color: #ccc; display:block; margin: 0 auto”></canvas></body> <script> window.onload = function(){ //Get canvas object var canvas = document.querySelector(“canvas”); //Get context var context = canvas.getContext(“2d”); //Encapsulates a function used for clock dynamics function clock(){ //Draw disc context. beginPath();// start context.arc(300,300,200,0,2*Math.PI); context. fillStyle = “pink”;// […]