Rakesh Jain Profile picture
Jun 3 β€’ 23 tweets β€’ 9 min read Twitter logo Read on Twitter
Top 20 Linux networking commands explained with examples!

A Thread πŸ‘‡ PS: https://cdn.lynda.com/c...
1⃣ ifconfig: Displays network interface configuration.

For example,
ifconfig eth0

shows the configuration details of the Ethernet interface. #LinuxNetworkingExample
2⃣ ip: Versatile command to manage network interfaces, addresses, and routes.

For instance,
ip addr show

displays IP addresses assigned to all interfaces. #LinuxNetworkingExample
3⃣ ping: Checks connectivity to a host by sending ICMP echo requests.

E.g.,
ping google.com

verifies if you can reach Google's servers. #LinuxNetworkingExample
4⃣ traceroute: Determines the path packets take to reach a destination.

Example:
traceroute google.com

shows the network hops to Google. #LinuxNetworkingExample
5⃣ netstat: Shows network connections, open ports, and routing table.

netstat -tuln

displays listening TCP/UDP ports. #LinuxNetworkingExample
6⃣ ss: Similar to netstat, provides socket-level details.

For eg.
ss -tunap

to view all TCP and UDP sockets with associated processes. #LinuxNetworkingExample
7⃣ route: Manages IP routing table.

Example:
route -n

shows the routing table with network destinations and gateways. #LinuxNetworkingExample
8⃣ iptables: Powerful firewall tool.

E.g.,
iptables -A INPUT -p tcp --dport 22 -j ACCEPT

allows SSH traffic. #LinuxNetworkingExample
9⃣ tcpdump: Captures and analyzes network traffic.

tcpdump -i eth0 port 80

captures HTTP traffic on the Ethernet interface. #LinuxNetworkingExample
πŸ”Ÿ nslookup: Queries DNS servers.

nslookup google.com

retrieves the IP address of Google's domain. #LinuxNetworkingExample
1⃣1⃣ dig: Advanced DNS lookup utility.

dig +trace example.com

performs a trace route for Example's domain. #LinuxNetworkingExample
1⃣2⃣ hostname: Displays or sets the system's hostname.

hostname

shows the current hostname. #LinuxNetworkingExample
1⃣3⃣ arp: Manages ARP cache.

arp -a

displays the ARP table with MAC and IP address mappings. #LinuxNetworkingExample
1⃣4⃣ ifup/ifdown: Activates or deactivates a network interface.

E.g.,
ifdown eth0

disables the Ethernet interface. #LinuxNetworkingExample
1⃣5⃣ iwconfig: Configures wireless network interfaces.

Example:
iwconfig wlan0 essid "MyNetwork"

sets the wireless network. #LinuxNetworkingExample
1⃣6⃣ netcat (nc): Versatile networking utility.

nc -vz google.com 80

checks if port 80 on Google is reachable. #LinuxNetworkingExample
1⃣7⃣ ssh: Connects to a remote machine securely.

ssh user@hostname

establishes an SSH session to the specified host. #LinuxNetworkingExample
1⃣8⃣ scp: Copies files securely between hosts.

scp file.txt user@hostname:/destination

transfers file.txt to a remote host. #LinuxNetworkingExample
1⃣9⃣ wget: Retrieves files from the web.

E.g.,
wget example.com/file.zip

downloads file.zip from a URL. #LinuxNetworkingExample
2⃣0⃣ curl: Versatile tool for transferring data.

curl api.example.com

fetches data from the specified URL. #LinuxNetworkingExample
Hope these examples help you understand these networking commands better! #Linux #Networking #SysAdmin
Retweet the thread if you find it useful. Thanks!

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with Rakesh Jain

Rakesh Jain Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @devops_tech

Jun 1
20 most useful kubectl command examples!

A Thread πŸ‘‡ PS: https://geekflare.com/w...
1️⃣ kubectl get pods -n <namespace>

Retrieves all pods in a specific namespace.
2️⃣ kubectl describe pod <pod-name> -n <namespace>

Provides detailed information about a specific pod.
Read 23 tweets
May 25
Ansible Ad Hoc Commands!

20 important Examples below πŸ‘‡ Image
1/20 πŸ”₯ Use 'ansible' followed by the target host(s) to execute ad hoc commands.

For example:
ansible all -m ping

pings all hosts in your inventory.
2/20 πŸ“œ To run a shell command remotely, employ the 'shell' module:

ansible all -m shell -a 'ls /tmp'

lists the contents of '/tmp' on all hosts.
Read 22 tweets
May 23
Want your application to migrate to AWS!

Step-by-step process to migrate an application running on-premises to AWS Cloud -

A Thread πŸ‘‡
Step 1: Assess Your Application:

Understand your application's architecture, dependencies, and resource requirements. Identify potential challenges and areas for improvement. Image
Step 2: Design the AWS Architecture:

Create a cloud architecture that suits your application's needs. Consider services like EC2, RDS, S3, and load balancers. Leverage AWS Well-Architected Framework for best practices.
Read 19 tweets
May 13
The differences between NGINX load balancer and AWS Application Load Balancer! βš–οΈ

Which one is cost πŸ’° effective!

A Thread πŸ‘‡ PS: https://dytvr9ot2sszz.c...
1/8 NGINX load balancer is an open-source software that can be used to distribute incoming network traffic across multiple servers. In contrast, AWS Application Load Balancer (ALB) is a fully managed service that's offered by Amazon Web Services.
2/8 NGINX load balancer is highly customizable and can be configured to handle a wide range of use cases. It provides advanced load balancing features like caching, SSL termination, and content-based routing. AWS ALB, on the other hand, is designed to be simple and easy to use.
Read 22 tweets
May 12
Does Serverless save you cost or increase your spending?

What does The Prime Video "microservices to monolith" story tells us!

Somebody wrote:
β€œEven Amazon can’t make sense of serverless”

Pros / Cons explained below πŸ‘‡

#Monolith #architecture #Serverless #PrimeVideo PS: https://acropolium.com/...
The difference between serverless and microservices -

#Serverless and microservices are both modern approaches to software development and deployment, but they have some key differences. PS: https://www.techmagic.c...
Microservices are a way of building and deploying applications as small, independently deployable services that communicate with each other. They can be deployed on traditional servers or in containers.
Read 17 tweets
May 11
HTTP status codes!

A Thread explaining all of them πŸ‘‡ Image
1xx Informational

100 Continue:

Server has received the request headers, client should proceed with the request body
101 Switching Protocols:

Server is switching protocols (e.g., upgrade to WebSocket)
Read 22 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(