Commands Glossary

>Ping

Test network connectivity.

Usage:
ping hostname_or_ip

>ifconfig/ip

Display or configure network interfaces.

Usage:
ifconfig or ip addr show

>traceroute

Trace the route packets take to a network host.

Usage:
traceroute hostname

>ssh

Securely connect to remote machines.

Usage:
ssh username@hostname

>scp

Securely copy files between machines.

Usage:
scp source_file username@hostname:destination_folder

>netstat

Display network connections, routing tables, interface statistics, and more.

Usage:
netstat -an

>nc (netcat)

Versatile tool for reading from and writing to network connections.

Usage:
nc hostname port

>nmap

Network exploration tool and security / port scanner.

Usage:
nmap -v hostname

>tcpdump

Command-line packet analyzer.

Usage:
tcpdump -i eth0

>ss

Investigates sockets.

Usage:
ss -tulpn

>iptables

Control the Linux kernel's network packet filtering framework.

Usage:
iptables -L

>firewalld

Manage firewall rules with a dynamic daemon.

Usage:
firewall-cmd --list-all

>route

Show/manipulate the IP routing table.

Usage:
route -n

>dig

DNS lookup utility.

Usage:
dig example.com

>curl

Tool to transfer data from or to a server.

Usage:
curl http://example.com

>wget

Network downloader.

Usage:
wget http://example.com/file.txt

>cd

Change directory.

Usage:
cd /path/to/directory

>ls

List files and directories in your current workspace.

Usage:
ls -l provides the list.

>pwd

Print the working directory.

Usage:
pwd

>mkdir

Makes a directory.

Usage:
mkdir new_directory

>find

Search for files in a directory hierarchy

Usage:
find . -name "filename"

>du

Display disk usage statistics.

Usage:
du -sh

>df

Report file system disk space usage.

Usage:
df -h

>touch

Create a new file or update the timestamps of an existing file.

Usage:
touch filename

>nano/vi

Edit files using a text editor

Usage:
nano filename OR vi filename

>cp

Copy files or directories.

Usage:
cp source_file destination_file

OR

cp -r source_directory destination_directory

>mv

Move or rename files or directories.

Usage:
mv current_filename new_filename

OR

mf file/path/to/directory/

>rm

Remove files or directories.

Usage:
rm filename

OR

rm -r directory_name

to remove a directory and its contents.

>chmod

Change file permissions

Usage:
chmod 755 filename OR chmod +x filename

to make a file executable.

>chown

Change file owner and group

Usage:
chown user:group filename

>chgrp

Change the group ownership of file

Usage:
chgrp groupname filename