0% found this document useful (0 votes)
6 views25 pages

Networking Commands

The document provides an overview of various networking commands including Ping, Netstat, Ifconfig, Traceroute, and others, explaining their purposes and usage. It details how to check network connectivity, monitor connections, and perform domain name lookups. Additionally, it compares tools like Curl and Wget for file transfers, highlighting their features and differences.

Uploaded by

praveenmasthan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views25 pages

Networking Commands

The document provides an overview of various networking commands including Ping, Netstat, Ifconfig, Traceroute, and others, explaining their purposes and usage. It details how to check network connectivity, monitor connections, and perform domain name lookups. Additionally, it compares tools like Curl and Wget for file transfers, highlighting their features and differences.

Uploaded by

praveenmasthan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Networking Commands:

Commands We are going to discuss on


commands:
Ping
Netstat
Ifconfig
Traceroute vs tracepath
Mtr
Nslookup
telnet
hostname
ip
iwconfig
ss
arp
dig
nc (netcat)
whois
ifplugstatus
ping:
=====
To check whether the netweok connection is reacheable or to test
the network speed we will use the ping command

Or to know the response time from host to destination and also


gives the packets loss data information

syntax:
ping network name
EX:

ping itgizz.com or ipaddress

Netstat: network statistics


Netstat will come under the tool called
as “net-tools”
We need to install the netstat
EX:
So first install the net-tools
apt install net-tools

Once installed ,check netstat


It will work
Ex:
netstat
this will gives the all active internet
connections and provides the
information like
protocols ,receiver,sender local
address ,foreign address and state .

This is mainly usied to moniter the


income and outgoing connections
To see all the listening ports:both TCP
and UDP ports
netstat -a
netstat -at =only tcp port numbers
netstat -au =only udp port numbers

Netstat -l:only listening port numbers


Only tcp listing ports:
netstat -lt

Only udp listening ports


netstat -lu
To see the statistics:
How many incomnng packets
Connection open
Packets losss
netstat -s
netstat - p
displays the PID and service name
netstat -n
which display the prt numbers
periculary

iproute or netstat -I
both give same info

ifconfig: (linux)
ipconfig(windows)
it will gives the information of varfous
netwoek inreerfaces
like docker ,enxo etc..

Nslookup:
This is used to convert the domain name
to ipaddress
Or
to know the servname of the domain
Taceroute:
First install the package traceroute
I want to trace youtube.com
traceroute itgizz.com

Or we can use tracepath


tracepath itgizz.com
Mtr:
mytraceroute
mtr itgizz.com
This is used to ping and gives the path
of the domain

Hostname:
To change the hostname
To know the hostname
cat /etc/hosts
ip address show:
is used to show the ip address
ip address show

Iwconfig:
To see the wireless connections;
Iwconfig
Ss:
This is a another version of netstat
Ths will works like netstat

Dig: Domain Information grouper


Whois:
whois itgizz.com
this gives the information from whom
we bought the domain and its complete
iformation
whois google.com
Arp:Address resolution protocol

Netcat (cn)

Curl vs wget:
Curl:

Is used to trasfer the data to a server .


Using the supporting protocols like:
File,FTP,FTPS,Http,Https,LDAP,LDAPS,PO
P3,SCP,SFTP,TELNET and SMTP

If you want to download file with curl command, then


you can use either the -o or -O option

https://dlcdn.apache.org/tomcat/
tomcat-10/v10.1.25/bin/apache-
tomcat-10.1.25.tar.gz

we can download multiple files by


using -o
curl -O [file1_address] -O [File2_address] -O
[file3_address]
If your downloading process is interrupted by any
reason then you a resume download process by using
the -C – option.
It is very useful for those people, who don’t have an
internet connection. Or internet connection drops
during the download of a large file. You don’t need to
download the same file from scratch you can continue
with the previous downloads.

Wget vs Curl:
Wget is a more specialized tool that is
designed for downloading files from
web servers. It supports a variety of
protocols, including HTTP, HTTPS, and
FTP.
Curl is a more general-purpose tool that can
be used for a variety of tasks, including
downloading files, uploading files, and
making HTTP requests. Curl supports a
wider range of protocols than wget,
including SFTP, FTPS, and SCP.

Wget:
Download a file to a perticular
directory
:
wget -P /opt/
http://centos.excellmedia.net/8.1.1911/isos/x86_64/C
entOS-8.1.1911-x86_64-dvd1.torrent

Use wget command to


download file and save
with different name
wget -O newfilename.extension
https://resource_address/currentfile.extension

Set downloading speed


limit by wget command
wget –limit-rate=1m
http://centos.excellmedia.net/8.1.1911/isos/x86
_64/CentOS-8.1.1911-x86_64-dvd1.iso

Send download in
Background with wget
command
wget -b
http://centos.excellmedia.net/8.1.1911/isos/x86
_64/CentOS-8.1.1911-x86_64-dvd1.iso
Use wget command to
download multiple files
wget https://file_resource/file1.gz
https://file_resource/file2.gz
https://file_resource/file3.gz
Download via FTP by
using wget command

wget ftp://ftp.example.com/file.tar.gz

You might also like