跳到主要内容

8 篇博文 含有标签「cli」

查看所有标签

Best Practices of Linux System Performance Analysis and Tuning with CLI

· 阅读需 5 分钟

Introduction​

Monitoring and tuning Linux system performance is crucial for maintaining the health and efficiency of your infrastructure. Command line tools like top, htop, iotop, sar, ps, free, vmstat, and netstat provide powerful capabilities for analyzing and optimizing system performance. This article provides a comprehensive guide to the best practices of using these tools, covering various scenarios such as checking CPU and memory usage, monitoring processes, and troubleshooting real production issues.


Basic System Monitoring​

Check CPU Usage​

To check CPU usage, use the top command:

top

This command displays real-time CPU and memory usage, along with a list of running processes.

Check Memory Usage​

To check memory usage, use the free command:

free -h

This command displays the total, used, and free memory in a human-readable format.

Check Disk I/O​

To check disk I/O, use the iostat command:

iostat -x 1

This command displays detailed I/O statistics, including read and write rates.

Check Network Traffic​

To check network traffic, use the iftop command:

iftop -i eth0

This command displays real-time network traffic on the eth0 interface.


Process Monitoring​

List Running Processes​

To list all running processes, use the ps command:

ps aux

This command displays a detailed list of all running processes.

Check Process Status​

To check the status of a specific process, use the ps command with the process ID (PID):

ps -p <PID> -o pid,ppid,cmd,%cpu,%mem,state

This command displays the status of the process with the specified PID.

Kill a Process​

To kill a process, use the kill command with the process ID (PID):

kill <PID>

This command sends a termination signal to the process with the specified PID.


Advanced Performance Tuning​

Top​

To monitor system performance in real-time, use the top command:

top

This command provides a dynamic view of system resources and running processes.

Htop​

To monitor system performance with a more user-friendly interface, use htop:

htop

This command provides a colorful and interactive view of system resources and running processes.

Iotop​

To monitor disk I/O in real-time, use the iotop command:

iotop

This command displays real-time disk I/O statistics for running processes.

Sar​

To collect and report system activity, use the sar command:

sar -u 1 5

This command collects CPU usage statistics every second for 5 seconds.


Troubleshooting Real Production Issues​

High CPU Usage​

To identify processes causing high CPU usage, use top or htop:

top

Sort processes by CPU usage by pressing P.

High Memory Usage​

To identify processes causing high memory usage, use top or htop:

top

Sort processes by memory usage by pressing M.

High Disk I/O​

To identify processes causing high disk I/O, use iotop:

iotop

This command displays real-time disk I/O statistics for running processes.

Network Latency​

To diagnose network latency, use ping and traceroute:

ping google.com
traceroute google.com

These commands help identify network latency and routing issues.


Conclusion​

Monitoring and tuning Linux system performance is essential for maintaining the health and efficiency of your infrastructure. By mastering the various options and scenarios covered in this article, you can effectively use command line tools like top, htop, iotop, sar, ps, free, vmstat, and netstat to analyze and optimize system performance.


References​

  1. top Man Page
  2. htop Man Page
  3. iotop Man Page
  4. sar Man Page
  5. ps Man Page
  6. free Man Page
  7. iostat Man Page
  8. iftop Man Page
  9. ping Man Page
  10. traceroute Man Page

By following these best practices, you can leverage these system performance tools to their full potential and efficiently manage your monitoring and tuning tasks.

Best Practices of Using Command Line Tools for Network Analysis

· 阅读需 4 分钟

Introduction​

Network analysis is a critical skill for system administrators and network engineers. Command line tools like ping, traceroute, netstat, tcpdump, nmap, iftop, and wireshark provide powerful capabilities for monitoring, diagnosing, and troubleshooting network issues. This article provides a comprehensive guide to the best practices of using these tools, covering various scenarios such as capturing and filtering network traffic, displaying network statistics, and diagnosing network issues.


Basic Network Analysis​

Ping​

To check connectivity to a host, use the ping command:

ping google.com

This command sends ICMP echo requests to the specified host and displays the response time.

Traceroute​

To trace the route to a host, use the traceroute command:

traceroute google.com

This command shows the path packets take to reach the specified host.

Netstat​

To display network statistics and active connections, use the netstat command:

netstat -a

This command displays all active connections and listening ports.

Netcat​

To test network connections and transfer data, use the nc (netcat) command:

nc -zv google.com 80

This command checks if port 80 is open on google.com.


Advanced Network Analysis​

Tcpdump​

To capture and analyze network traffic, use the tcpdump command:

tcpdump -i eth0

This command captures all traffic on the eth0 interface.

Wireshark​

To capture and analyze network traffic with a graphical interface, use wireshark:

wireshark

This tool provides advanced filtering and analysis capabilities.

Nmap​

To scan for open ports and services on a host, use the nmap command:

nmap 192.168.1.1

This command scans the specified IP address for open ports and services.

Iftop​

To monitor network traffic in real-time, use the iftop command:

iftop -i eth0

This command displays real-time network traffic on the eth0 interface.


Combining Commands​

Using grep with tcpdump​

To filter tcpdump output, use grep:

tcpdump -i eth0 | grep "HTTP"

This command filters tcpdump output to show only HTTP traffic.

Using awk with netstat​

To process netstat output, use awk:

netstat -an | awk '/:80 / {print $5}'

This command extracts the IP addresses of connections on port 80.

Using sed with nmap​

To process nmap output, use sed:

nmap 192.168.1.1 | sed -n '/open/p'

This command filters nmap output to show only open ports.


Advanced Scenarios​

Analyzing HTTP Traffic​

To capture and analyze HTTP traffic, use tcpdump with port filtering:

tcpdump -i eth0 port 80

Monitoring Real-Time Traffic​

To monitor real-time traffic on a specific interface, use iftop:

iftop -i eth0

Diagnosing Network Issues​

To diagnose network issues, use a combination of ping, traceroute, and tcpdump:

ping google.com
traceroute google.com
tcpdump -i eth0 host google.com

Conclusion​

Network analysis is a critical skill for maintaining and troubleshooting network infrastructure. By mastering the various options and scenarios covered in this article, you can effectively use command line tools like ping, traceroute, netstat, tcpdump, nmap, iftop, and wireshark to monitor, diagnose, and troubleshoot network issues.


References​

  1. ping Man Page
  2. traceroute Man Page
  3. netstat Man Page
  4. nc (netcat) Man Page
  5. tcpdump Man Page
  6. Wireshark Documentation
  7. nmap Man Page
  8. iftop Man Page

By following these best practices, you can leverage these network analysis tools to their full potential and efficiently manage your network monitoring and troubleshooting tasks.

Best Practices of Using curl

· 阅读需 4 分钟

Introduction​

curl is a powerful command-line tool used for transferring data with URLs. It supports a wide range of protocols, including HTTP, HTTPS, FTP, and more. This article provides a comprehensive guide to the best practices of using curl, covering various scenarios such as checking if an URL is alive, downloading files, making HTTP GET/POST requests, handling authentication, and dealing with HTTPS certificates.


Basic Usage​

Check if an URL is Alive​

To check if an URL is alive, you can use the -I (or --head) option to send a HEAD request:

curl -I https://example.com

This command will return the HTTP headers without downloading the content, allowing you to quickly check if the URL is accessible.

Download a File​

To download a file from a URL, simply use the curl command followed by the URL:

curl -O https://example.com/file.zip

The -O option saves the file with the same name as the remote file. If you want to save the file with a different name, use the -o option:

curl -o myfile.zip https://example.com/file.zip

HTTP Methods​

HTTP GET​

To make an HTTP GET request, use the curl command followed by the URL:

curl https://example.com/api/resource

HTTP POST with JSON Payload​

To make an HTTP POST request with a JSON payload, use the -X POST option and specify the JSON data using the -d option:

curl -X POST -H "Content-Type: application/json" -d '{"key1":"value1", "key2":"value2"}' https://example.com/api/resource

Authentication​

HTTP Basic Authentication​

To use HTTP Basic Authentication, use the -u option to specify the username and password:

curl -u username:password https://example.com/api/resource

Bearer Token Authentication​

To use Bearer Token Authentication, use the -H option to set the Authorization header:

curl -H "Authorization: Bearer YOUR_TOKEN" https://example.com/api/resource

HTTPS and Certificates​

HTTPS with Certificate​

To use HTTPS with a client certificate, use the --cert and --key options:

curl --cert client.crt --key client.key https://example.com/api/resource

Ignore HTTPS Certificate​

To ignore HTTPS certificate validation (not recommended for production), use the -k (or --insecure) option:

curl -k https://example.com/api/resource

Advanced Scenarios​

Custom Headers​

To send custom headers, use the -H option:

curl -H "X-Custom-Header: value" https://example.com/api/resource

Follow Redirects​

To follow HTTP redirects, use the -L (or --location) option:

curl -L https://example.com/redirect

Verbose Output​

To get verbose output, use the -v (or --verbose) option:

curl -v https://example.com/api/resource

Timeouts​

To set a timeout for the request, use the --connect-timeout and --max-time options:

curl --connect-timeout 5 --max-time 10 https://example.com/api/resource

Conclusion​

curl is a versatile and powerful tool for interacting with web services and downloading files from the command line. By mastering the various options and scenarios covered in this article, you can effectively use curl for a wide range of tasks, from simple URL checks to complex HTTP requests with authentication and custom headers.


References​

  1. curl Documentation
  2. curl Man Page
  3. HTTP Methods
  4. HTTP Authentication
  5. HTTPS

By following these best practices, you can leverage curl to its full potential and efficiently manage your web interactions from the command line.

Best Practices of Using the awk Command

· 阅读需 4 分钟

Introduction​

The awk command is a powerful text processing tool in Unix-like operating systems. It is particularly useful for manipulating and analyzing structured text data, such as log files, CSV files, and other tabular data. This article provides a comprehensive guide to the best practices of using the awk command, covering various scenarios such as printing lines, field manipulation, pattern matching, and combining awk with other commands using pipelines.


Basic Usage​

Printing Lines​

To print all lines from a file, use the following command:

awk '{print}' filename.txt

Field Separator​

To specify a custom field separator, use the -F option:

awk -F, '{print}' filename.csv

Printing Specific Fields​

To print specific fields, use the $ notation:

awk '{print $1, $3}' filename.txt

This command prints the first and third fields of each line.


Advanced Usage​

Pattern Matching​

To print lines that match a specific pattern, use the ~ operator:

awk '/pattern/ {print}' filename.txt

Conditional Statements​

To use conditional statements, use the if statement:

awk '{if ($1 > 10) print $0}' filename.txt

This command prints lines where the first field is greater than 10.

Looping​

To use loops, use the for loop:

awk '{for (i=1; i<=NF; i++) print $i}' filename.txt

This command prints each field on a new line.

Arrays​

To use arrays, use the array[index] notation:

awk '{array[$1]++} END {for (i in array) print i, array[i]}' filename.txt

This command counts the occurrences of each value in the first field.


Combining with Other Commands​

Using awk with grep​

To combine awk with grep, use a pipeline:

grep "pattern" filename.txt | awk '{print $2}'

This command prints the second field of lines that match the pattern.

Using awk with sed​

To combine awk with sed, use a pipeline:

sed 's/old/new/g' filename.txt | awk '{print $1}'

This command replaces old with new in each line and then prints the first field.

Using awk with find​

To combine awk with find, use a pipeline:

find /path/to/search -name "*.log" | awk -F/ '{print $NF}'

This command prints the base name of each .log file found by find.


Advanced Scenarios​

Summing Columns​

To sum the values in a column, use the + operator:

awk '{sum += $1} END {print sum}' filename.txt

This command sums the values in the first column.

Calculating Averages​

To calculate the average of a column, use the + operator and divide by the number of lines:

awk '{sum += $1} END {print sum/NR}' filename.txt

This command calculates the average of the first column.

Formatting Output​

To format the output, use the printf function:

awk '{printf "%-10s %s\n", $1, $2}' filename.txt

This command formats the first field to be left-aligned with a width of 10 characters.


Conclusion​

The awk command is a versatile and powerful tool for text processing and data analysis. By mastering the various options and scenarios covered in this article, you can effectively use awk for a wide range of tasks, from simple text manipulation to complex data processing and analysis.


References​

  1. awk Man Page
  2. GNU awk Documentation
  3. grep Man Page
  4. sed Man Page
  5. find Man Page

By following these best practices, you can leverage the awk command to its full potential and efficiently manage your text processing and data analysis tasks from the command line.

Best Practices of Using the find Command

· 阅读需 7 分钟

Introduction​

The find command is a powerful tool in Unix-like operating systems for searching files and directories based on various criteria such as name, type, size, owner, date, and more. This article provides a comprehensive guide to the best practices of using the find command, covering various scenarios such as finding files by name, content, owner, date, and combining find with other commands using pipelines.


Basic Usage​

Find Files by Name​

To find files by name, use the -name option:

find /path/to/search -name "filename.txt"

Find Files by Wildcard Pattern​

To find files using a wildcard pattern, use the -name option with wildcards:

find /path/to/search -name "*.log"

Find Files by Content​

To find files containing specific content, use the -exec option with grep:

find /path/to/search -type f -exec grep -l "search_string" {} \;

Search in Subdirectories​

By default, find searches in all subdirectories. You can specify the starting directory:

find /path/to/search -name "filename.txt"

Advanced Search Criteria​

Find Files by Owner​

To find files owned by a specific user, use the -user option:

find /path/to/search -user username

Find Files by Date and Time​

To find files modified within a specific time range, use the -mtime option:

find /path/to/search -mtime -7 # Files modified in the last 7 days
find /path/to/search -mtime +7 # Files modified more than 7 days ago

Combining with Other Commands​

Using xargs​

To perform an action on the found files, use xargs:

find /path/to/search -name "*.log" | xargs rm

Using grep​

To search for files containing specific content, use grep with find:

find /path/to/search -type f -exec grep -l "search_string" {} \;

Using awk​

To process the output of find with awk, use a pipeline:

find /path/to/search -name "*.txt" | awk '{print $1}'

Advanced Scenarios​

Find and Delete Files​

To find and delete files, use the -delete option:

find /path/to/search -name "*.bak" -delete

Find and Move Files​

To find and move files, use the -exec option with mv:

find /path/to/search -name "*.log" -exec mv {} /path/to/destination/ \;

Find and Copy Files​

To find and copy files, use the -exec option with cp:

find /path/to/search -name "*.txt" -exec cp {} /path/to/destination/ \;

Conclusion​

The find command is a versatile and powerful tool for searching files and directories based on various criteria. By mastering the various options and scenarios covered in this article, you can effectively use find for a wide range of tasks, from simple file searches to complex operations involving multiple commands and pipelines.


Appendix​

Using xargs​

The command find /path/to/search -type f -exec grep -l "search_string" {} \; can be rewritten using xargs. The xargs command is useful for building and executing command lines from standard input. Here’s how you can rewrite the command using xargs:

Using xargs to rewrite the find command with -exec can make your command more efficient and easier to read. By leveraging xargs, you can handle large numbers of files more effectively and streamline your command-line operations.

find /path/to/search -type f | xargs grep -l "search_string"

Explanation​

  1. find /path/to/search -type f: This part of the command finds all files (-type f) in the specified directory and its subdirectories.
  2. | xargs grep -l "search_string": The | (pipe) symbol passes the list of files found by find to xargs. xargs then constructs and executes the grep command for each file, searching for the specified string ("search_string") and printing the names of files that contain the string (-l option).

Benefits of Using xargs​

  • Efficiency: xargs can handle a large number of files more efficiently than the -exec option, especially when dealing with a large number of files.
  • Simplification: The xargs version is often simpler and more concise.

Example​

Suppose you want to find all files in the /var/log directory that contain the string "error". You can use the following command:

find /var/log -type f | xargs grep -l "error"

This command will output the names of all files in the /var/log directory and its subdirectories that contain the string "error".

Using curly brackets {}​

The {} in the command find /path/to/search -name "*.log" -exec mv {} /path/to/destination/ \; is a placeholder that represents the current file being processed by the find command. Let's break down the command and understand the role of {}.

The {} placeholder in the find command with -exec is a powerful feature that allows you to dynamically insert the current file path into the command being executed. This makes it easy to perform operations on each file found by find, such as moving, copying, or deleting files.

Command Breakdown​

find /path/to/search -name "*.log" -exec mv {} /path/to/destination/ \;
  1. find /path/to/search -name "*.log": This part of the command searches for all files in the /path/to/search directory and its subdirectories that match the pattern *.log.

  2. -exec mv {} /path/to/destination/ \;: This part of the command executes the mv command for each file found by find.

    • {}: This placeholder is replaced by the full path of the current file found by find. For example, if find finds a file named example.log in the directory /path/to/search/subdir, {} will be replaced by /path/to/search/subdir/example.log.
    • /path/to/destination/: This is the destination directory where the files will be moved.
    • \;: This is the terminator for the -exec command. It tells find that the command is complete.

Example​

Suppose you have the following directory structure:

/path/to/search/
├── file1.log
├── file2.log
└── subdir/
└── file3.log

Running the command:

find /path/to/search -name "*.log" -exec mv {} /path/to/destination/ \;

will result in the following actions:

  1. find will locate file1.log, file2.log, and subdir/file3.log.
  2. For each file found, find will execute the mv command:
    • mv /path/to/search/file1.log /path/to/destination/
    • mv /path/to/search/file2.log /path/to/destination/
    • mv /path/to/search/subdir/file3.log /path/to/destination/

After the command completes, all .log files will be moved to the /path/to/destination/ directory.

References​

  1. find Man Page
  2. GNU findutils Documentation
  3. xargs Man Page
  4. grep Man Page
  5. awk Man Page

By following these best practices, you can leverage the find command to its full potential and efficiently manage your file searches and operations from the command line.

Best Practices of Using the sed Command

· 阅读需 5 分钟

Introduction​

The sed command is a powerful stream editor for filtering and transforming text in Unix-like operating systems. It is particularly useful for performing search-and-replace operations, deleting lines, and modifying text files. This article provides a comprehensive guide to the best practices of using the sed command, covering various scenarios such as substitution, pattern matching, in-place editing, and combining sed with other commands using pipelines.


Basic Usage​

Substitution​

To replace a pattern with another string, use the s command:

sed 's/old/new/' filename.txt

This command replaces the first occurrence of old with new in each line.

Deleting Lines​

To delete lines that match a pattern, use the d command:

sed '/pattern/d' filename.txt

This command deletes all lines containing the pattern.

Printing Lines​

To print lines that match a pattern, use the p command:

sed -n '/pattern/p' filename.txt

This command prints all lines containing the pattern.


Advanced Usage​

Pattern Matching​

To match patterns using regular expressions, use the s command with regex:

sed 's/[0-9]+/number/' filename.txt

This command replaces all sequences of digits with the word number.

In-Place Editing​

To edit a file in place, use the -i option:

sed -i 's/old/new/' filename.txt

This command replaces old with new in the file filename.txt and saves the changes.

Multiple Commands​

To execute multiple commands, use the -e option:

sed -e 's/old/new/' -e '/pattern/d' filename.txt

This command replaces old with new and deletes lines containing pattern.

Address Ranges​

To apply commands to specific lines or ranges of lines, use address ranges:

sed '1,3s/old/new/' filename.txt

This command replaces old with new in lines 1 to 3.


Combining with Other Commands​

Using sed with grep​

To combine sed with grep, use a pipeline:

grep "pattern" filename.txt | sed 's/old/new/'

This command first filters lines containing pattern and then replaces old with new.

Using sed with awk​

To combine sed with awk, use a pipeline:

awk '{print $1}' filename.txt | sed 's/old/new/'

This command first prints the first field of each line and then replaces old with new.

Using sed with find​

To combine sed with find, use a pipeline:

find /path/to/search -name "*.log" -exec sed -i 's/old/new/' {} \;

This command finds all .log files and replaces old with new in each file.


Advanced Scenarios​

Inserting Text​

To insert text before or after a pattern, use the i or a command:

sed '/pattern/i\Insert this line before pattern' filename.txt
sed '/pattern/a\Append this line after pattern' filename.txt

Appending Text​

To append text to the end of a line, use the s command with a & to reference the matched pattern:

sed 's/pattern/& append/' filename.txt

This command appends append to the end of lines containing pattern.

Replacing Multiple Patterns​

To replace multiple patterns, use multiple s commands:

sed 's/old1/new1/; s/old2/new2/' filename.txt

This command replaces old1 with new1 and old2 with new2.


Conclusion​

The sed command is a versatile and powerful tool for text processing and transformation. By mastering the various options and scenarios covered in this article, you can effectively use sed for a wide range of tasks, from simple text substitution to complex text manipulation and file editing.


References​

  1. sed Man Page
  2. GNU sed Documentation
  3. grep Man Page
  4. awk Man Page
  5. find Man Page

By following these best practices, you can leverage the sed command to its full potential and efficiently manage your text processing and file editing tasks from the command line.

Best Practices of tcpdump and netstat

· 阅读需 4 分钟

Introduction​

Network analysis is a critical skill for system administrators and network engineers. Tools like tcpdump, netstat, ping, traceroute, nmap, and iftop provide powerful capabilities for monitoring, diagnosing, and troubleshooting network issues. This article provides a comprehensive guide to the best practices of using these commands, covering various scenarios such as capturing and filtering network traffic, displaying network statistics, and diagnosing network issues.


tcpdump​

Basic Usage​

To start capturing network traffic, use the following command:

tcpdump

This command captures all traffic on the default network interface.

Filtering Traffic​

To filter traffic by protocol, use the -i option:

tcpdump -i eth0

To filter traffic by IP address, use the host keyword:

tcpdump host 192.168.1.1

To filter traffic by port, use the port keyword:

tcpdump port 80

Saving Captures​

To save captured traffic to a file, use the -w option:

tcpdump -w capture.pcap

Reading Captures​

To read a saved capture file, use the -r option:

tcpdump -r capture.pcap

netstat​

Basic Usage​

To display all active connections, use the following command:

netstat -a

Displaying Active Connections​

To display active TCP connections, use the -t option:

netstat -at

Displaying Listening Ports​

To display listening ports, use the -l option:

netstat -lt

Displaying Network Statistics​

To display network statistics, use the -s option:

netstat -s

Other Network Analysis Commands​

ping​

To check connectivity to a host, use the ping command:

ping google.com

traceroute​

To trace the route to a host, use the traceroute command:

traceroute google.com

nmap​

To scan for open ports on a host, use the nmap command:

nmap 192.168.1.1

iftop​

To monitor network traffic in real-time, use the iftop command:

iftop -i eth0

Advanced Scenarios​

Analyzing HTTP Traffic​

To capture and analyze HTTP traffic, use tcpdump with port filtering:

tcpdump -i eth0 port 80

Monitoring Real-Time Traffic​

To monitor real-time traffic on a specific interface, use iftop:

iftop -i eth0

Diagnosing Network Issues​

To diagnose network issues, use a combination of ping, traceroute, and tcpdump:

ping google.com
traceroute google.com
tcpdump -i eth0 host google.com

Conclusion​

Network analysis is a critical skill for maintaining and troubleshooting network infrastructure. By mastering the various options and scenarios covered in this article, you can effectively use tools like tcpdump, netstat, ping, traceroute, nmap, and iftop to monitor, diagnose, and troubleshoot network issues.


References​

  1. tcpdump Man Page
  2. netstat Man Page
  3. ping Man Page
  4. traceroute Man Page
  5. nmap Man Page
  6. iftop Man Page

By following these best practices, you can leverage these network analysis tools to their full potential and efficiently manage your network monitoring and troubleshooting tasks.

Restman

· 阅读需 2 分钟
adfad
111

Restman is a command-line tool written in Python, designed to combine the simplicity of cURL with the powerful features of Postman. It aims to relieve users from the complexities of manually building network connections with URLs or endpoints, allowing them to focus solely on the core aspects of HTTP requests and responses. With Restman, users can quickly and efficiently test APIs, handle different HTTP methods, and parse response data without worrying about the underlying connection mechanics.

Github repo​

WhereQ Commandoes --- Restman

Free public APIs for Testing​

WebsiteURLDescription
Dummy API Exampledummy.restapiexample.comA simple API for testing dummy data.
ReqResreqres.inA hosted REST-API to simulate CRUD operations for testing.
Cat Factscatfact.ninjaProvides random cat facts.
Dog CEO APIdog.ceoRandom dog image generator.
JSONPlaceholderjsonplaceholder.typicode.comFake API for testing and prototyping.
RestCountriesrestcountries.comAPI for getting country-related information.
PokeAPIpokeapi.coFree API for Pokémon data.
CoinDesk APIcoindesk.comProvides Bitcoin price index and cryptocurrency news.
Agifyapi.agify.ioPredicts the age of a person based on their name.
Genderizeapi.genderize.ioPredicts the gender of a person based on their name.
Nationalizeapi.nationalize.ioPredicts the nationality based on a name.
Data USAdatausa.ioProvides data on the U.S. population.
IPifyapi.ipify.orgSimple API to get your public IP address.
IPInfoipinfo.ioProvides detailed geolocation information of an IP address.
Official Joke APIofficial-joke-api.appspot.comFetches a random joke.
Random User APIrandomuser.meGenerates random user data.
University Search APIuniversities.hipolabs.comSearch for universities worldwide.
Zippopotamzippopotam.usGet location data by U.S. ZIP code.