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, andtraceroutefor basic network troubleshooting - Securely connect or transfer files via
ssh,scp,rsync, andsftp - Automate or inspect web traffic using
wgetandcurl - Send messages system-wide using
wall, or directly viawrite
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 :
