# Day 3: Basic Linux commands (Part-2)

### Recap. 🙃

In Day-2 of learning DevOps, we covered what Linux is and some of its fundamental commands . Let's continue by learning more about these commands.

### Basic commands in Linux.

21. `diff`: Find differences between files. *Example*: `diff file1.txt file2.txt` compares two files.
    
22. `cmp`: Check if files are identical. *Example*: `cmp file1.txt file2.txt` compares byte by byte.
    
23. `comm`: Combine diff and cmp. *Example*: `comm file1.txt file2.txt` shows common lines.
    
24. `sort`: Sort file content. *Example*: `sort file.txt` arranges lines alphabetically.
    
25. `export`: Set environment variables. *Example*: `export MY_VAR=value` sets an environment variable.
    
26. `zip`: Zip files. *Example*: `zip`[`archive.zip`](http://archive.zip)`files/` creates a zip archive.
    
27. `unzip`: Unzip files. *Example*: `unzip`[`archive.zip`](http://archive.zip) extracts files from a zip archive.
    
28. `ssh`: Secure Shell. *Example*: `ssh user@hostname` connects to a remote server.
    
29. `service`: Start and stop services. *Example*: `service apache2 start` manages services.
    
30. `ps`: Display active processes. *Example*: `ps aux` lists all processes.
    
31. `kill` and `killall`: Terminate processes. *Example*: `kill -9 PID` forcefully stops a process by its process ID.
    
32. `df`: Display disk info. *Example*: `df -h` shows disk space usage.
    
33. `mount`: Mount file systems. *Example*: `mount /dev/sdb1 /mnt` mounts a partition to a directory.
    
34. `chmod`: Change file permissions. *Example*: `chmod +x`[`script.sh`](http://script.sh) makes a script executable.
    
35. `chown`: Grant ownership. *Example*: `chown user:group file.txt` changes file ownership.
    
36. `ifconfig`: Display network interfaces and IP addresses. *Example*: `ifconfig eth0` shows network details.
    
37. `traceroute`: Trace network hops. *Example*: `traceroute`[`google.com`](http://google.com) traces the route to Google’s server.
    
38. `wget`: Download files from the internet. *Example*: `wget`[`https://example.com/file.zip`](https://example.com/file.zip) downloads a file.
    
39. `ufw`: Firewall management. *Example*: `ufw allow 80/tcp` allows incoming HTTP traffic.
    
40. `iptables`: Base firewall. *Example*: `iptables -A INPUT -p tcp --dport 22 -j ACCEPT` allows SSH traffic.
    

### Watch these videos to learn more Linux commands. 🐧

%[https://youtu.be/cF-tpknh-64?si=c6yUyBina3C6p8TY] 

%[https://youtu.be/ry3Ap1s_nYo?si=bwrfPWbv5pxceNLe] 

Thank you for reading😉.
