I present to you a compilation of the most useful Linux commands for Telecommunications and network operations
Download files from the Internet
Download a file from a webpage
To download a file from a specific URL.
wget www.paginaweb.com/archivoDownload a file with resumption
Allows pausing the download and resuming it later.
wget -c www.paginaweb.com/archivoDownload a complete webpage
Downloads the entire structure of a webpage.
wget -r www.paginaweb.comNetwork operations
Show Ethernet configuration
Displays the network interface configuration.
ifconfig eth0Activate the eth0 interface
Activates the specified network interface.
ifup eth0Disable the eth0 interface
Deactivates the specified network interface.
ifdown eth0Configure an IP address
Assigns an IP address to the network interface.
ifconfig eth0 192.168.1.1 netmask 255.255.255.0Configure eth0 in promiscuous mode
Allows the interface to capture all packets on the network.
ifconfig eth0 promiscActivate the eth0 interface in DHCP mode
Requests an IP address automatically from a DHCP server.
dhclient eth0Show the routing table
Displays the configured routes in the system.
route -nConfigure default entry
Sets the default gateway.
route add -net 0/0 gw IP_GatewayConfigure static route
Adds a static route for a specific network.
route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1Delete static route
Removes a specific static route.
route del 0/0 gw IP_gatewayActivate IP forwarding
Enables IP packet forwarding.
echo “1” > /proc/sys/net/ipv4/ip_forwardShow hostname
Displays the current hostname.
hostnameResolve a name to an IP address
Looks up the IP address corresponding to a domain name.
host www.paginaweb.comResolve name and IP address
Provides information for both the name and the IP address.
nslookup www.paginaweb.comShow link status of all interfaces
Displays the link status of the network interfaces.
ip link showShow link status of eth0
Displays specific information about the eth0 interface.
mii-tool eth0Show network card statistics
Provides detailed statistics for the network interface.
ethtool eth0Show active network connections
Lists all active connections along with their PID.
netstat -tupShow listening services on the system
Lists the network services that are listening.
netstat -tuplShow HTTP traffic
Monitors HTTP traffic in real time.
tcpdump tcp port 80Show available wireless networks
Scans and displays nearby Wi-Fi networks.
iwlist scanShow configuration of a wireless network card
Displays the current configuration of a wireless interface.
iwconfig wlan0Search in the Whois database
Obtains registration information for a domain.
whois www.paginaweb.comSSH, SCP, and Tunneling
SSH login with X11 forwarding
Allows running graphical applications on the remote server.
ssh -X usuario@maquinaSSH login on a specific port
Connects to a server on a port different from the default.
ssh -p 15000 usuario@maquinaCopy files using SCP
Securely transfers files between systems.
scp /archivo [email protected]:/directorioCreate an SSH tunnel
Establishes an SSH tunnel to redirect ports.
ssh -f [email protected] -L 2000:servidor.dominio.es:25 -NPort forwarding using tunneling
Configures port forwarding through SSH.
ssh -v -L4001:localhost:4001 [email protected]