Linux/Unix Tutorial
Estimated reading: 4 minutes 275 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 :
Share

🌐 Linux/Unix: Networking & Communication

Or Copy Link

CONTENTS
Scroll to Top