Linux/Unix Tutorial
Estimated reading: 4 minutes 25 views

🌐 Linux/Unix: Networking & Communication – Commands for Ping, SSH, Transfers, and Diagnostics

🧲 Introduction – Power Your Terminal with Network Tools

Linux/Unix systems are widely used in servers and development environmentsβ€”making network communication a critical skill. Whether you’re troubleshooting connectivity, securely transferring files, or accessing web content from the CLI, Linux offers robust and versatile networking tools.

🎯 In this guide, you’ll learn:

  • How to test and diagnose network connections
  • How to securely connect and transfer files using SSH-based tools
  • How to fetch data from web servers using CLI tools
  • How to send messages between users on the system

πŸ“˜ Topics Covered

πŸ”΅ SubtopicπŸ“– Description
Basic Networking (ping, ip, ifconfig)Test connectivity and view/change IP configurations
Diagnostics (netstat, ss, traceroute)Check open ports, socket states, and packet routes
Transfers & Access (ssh, scp, rsync)Secure remote access and file transfers over encrypted protocols
Web Tools (wget, curl, lynx)Download, inspect, or interact with web resources from the terminal
Messaging (write, wall, mail)Communicate with logged-in users or send system messages

πŸ”΅ Linux/Unix: Basic Networking (ping, ip, ifconfig)

πŸ”Ή ping – Check Host Availability

ping google.com

βœ… Sends ICMP packets to test if the remote server is reachable.


πŸ”Ή ip – Modern IP Configuration Tool

ip a         # Show all IP addresses
ip link      # Show all interfaces
ip route     # Show routing table

πŸ”Ή ifconfig – Legacy Interface Configuration

ifconfig eth0

βœ… Still used on older systems to display or configure network interfaces.


πŸ”΅ Linux/Unix: Diagnostics (netstat, ss, traceroute, mtr)

πŸ”Ή netstat – View Open Ports and Connections

netstat -tuln

βœ… Lists TCP/UDP ports with numeric IP and port values.


πŸ”Ή ss – Modern Socket Statistics Tool

ss -tunlp

βœ… Faster alternative to netstat.


πŸ”Ή traceroute – Track Packet Path

traceroute google.com

βœ… Shows each hop your packet takes to reach the target.


πŸ”Ή mtr – Combine Ping + Traceroute

mtr google.com

βœ… Interactive real-time hop and packet loss tracking.


πŸ”΅ Linux/Unix: Transfers & Access (ssh, scp, rsync, sftp)

πŸ”Ή ssh – Secure Remote Shell

ssh user@host

βœ… Connect to remote systems securely using encrypted session.


πŸ”Ή scp – Secure Copy Over SSH

scp file.txt user@host:/path/

πŸ”Ή rsync – Efficient File Transfer with Syncing

rsync -avz local/ user@host:/remote/

βœ… Resumes transfers and syncs only changed parts.


πŸ”Ή sftp – Interactive File Transfer Shell

sftp user@host

πŸ”΅ Linux/Unix: Web Tools (wget, curl, lynx)

πŸ”Ή wget – Download from Web

wget https://example.com/file.zip

πŸ”Ή curl – Versatile Web Request Tool

curl -I https://example.com

βœ… Fetches headers, posts forms, or submits API calls.


πŸ”Ή lynx – Text-Based Web Browser

lynx https://example.com

βœ… Browse websites in terminal without graphics.


πŸ”΅ Linux/Unix: Messaging (write, wall, mail)

πŸ”Ή write – Send Message to Another User

write username

πŸ”Ή wall – Broadcast Message to All Users

wall "System will reboot in 5 minutes"

πŸ”Ή mail – Send/Read Emails from CLI

mail -s "Subject" user@example.com < message.txt

πŸ“Œ Summary – Recap & Next Steps

Linux networking tools provide deep control over network visibility, diagnostics, communication, and web interaction. Mastering them equips you to manage systems remotely, automate web access, and troubleshoot connectivity with confidence.

πŸ” Key Takeaways:

  • Use ping, ip, and traceroute for basic network troubleshooting
  • Securely connect or transfer files via ssh, scp, rsync, and sftp
  • Automate or inspect web traffic using wget and curl
  • Send messages system-wide using wall, or directly via write

βš™οΈ Real-World Use Cases:

  • Monitor server connectivity and latency
  • Automate backups or updates over SSH
  • Test APIs and download data from web servers
  • Notify all logged-in users of critical events

❓ Frequently Asked Questions

❓ What’s the difference between scp and rsync?
βœ… rsync is more efficient for large syncs and resumes; scp is simpler for quick transfers.


❓ How do I find which port a service is using?
βœ… Use:

ss -tunlp

❓ Can I schedule transfers with rsync?
βœ… Yes, combine with cron to automate backups and remote syncs.


❓ How can I check if a website is up from the terminal?
βœ… Use:

curl -I https://example.com

❓ Is ifconfig deprecated? What should I use instead?
βœ… Yes. Use the modern replacement:

ip a

Share Now :

Leave a Reply

Your email address will not be published. Required fields are marked *

Share

🌐 Linux/Unix: Networking & Communication

Or Copy Link

CONTENTS
Scroll to Top