DEV Community

Cover image for 19 Advance Linux Commands You Should Know!
DevOps Descent
DevOps Descent

Posted on • Edited on

63 4 4 5 4

19 Advance Linux Commands You Should Know!

1. htop

  • Usage: Interactive process viewer that’s much more advanced than top.
  • Command: htop
  • Description: Shows processes, memory, and CPU usage in a user-friendly, color-coded layout.

Image description

2. nmap

  • Usage: Network mapping and discovery.
  • Command: nmap -sP 192.168.1.0/24
  • Description: Scans a network range to identify active devices.

Image description

3. rsync

  • Usage: Syncs directories and files locally or across networked systems.
  • Command: rsync -av /source /destination
  • Description: Great for backups and maintaining directories across systems.

Image description

4. tmux

  • Usage: Terminal multiplexer allowing multiple sessions.
  • Command: tmux
  • Description: Enables you to switch between several programs in a single terminal.

Image description

5. awk

  • Usage: Text processing and data extraction from files.
  • Command: awk '{print $1}' file.txt
  • Description: Powerful for extracting and formatting text data.

Image description

6. dig

  • Usage: DNS lookup tool.
  • Command: dig example.com
  • Description: Provides DNS information for domain troubleshooting.

Image description

7. tcpdump

  • Usage: Packet sniffer for network troubleshooting.
  • Command: sudo tcpdump -i eth0
  • Description: Allows monitoring of incoming and outgoing packets.

Image description

8. lsof

  • Usage: Lists open files and the processes using them.
  • Command: lsof -i :80
  • Description: Essential for diagnosing file locks and network usage.

Image description

9. jq

  • Usage: Processes JSON data.
  • Command: jq '.' file-name.json
  • Description: Parses and formats JSON data from files or APIs.

Image description

10. iftop

  • Usage: Monitors bandwidth usage per IP.
  • Command: sudo iftop
  • Description: Real-time network traffic monitoring by IP address.

Image description

11. strace

  • Usage: Traces system calls and signals.
  • Command: strace -p <PID>
  • Description: Useful for debugging by tracing system calls from a process.

Image description

12. ip a

  • Usage: Displays network interfaces and IP address configuration.
  • Command: ip a
  • Description: Essential for managing network settings on modern Linux systems.

Image description

13. grep -r

  • Usage: Searches text within files recursively.
  • Command: grep -r 'search-term' /path/to/directory
  • Description: Locates specific text across directories, useful for log analysis.

Image description

14. iostat

  • Usage: Monitors CPU and I/O statistics.
  • Command: iostat -x 1
  • Description: Helps in understanding disk and CPU usage patterns over time.

Image description

15. iptables

  • Usage: Configures firewall rules.
  • Command: sudo iptables -L
  • Description: Manages network traffic control for security purposes.

Image description

16. nc (Netcat)

  • Usage: Network utility for debugging and testing.
  • Command: nc
  • Description: Versatile for creating connections, debugging, and port scanning.

Image description

17. sar

  • Usage: Collects, reports, and saves system activity information.
  • Command: sar -u 1 5
  • Description: Monitors performance metrics, including CPU, memory, and network.

Image description

18. atop

  • Usage: Monitors system performance.
  • Command: atop
  • Description: Provides a detailed look at processes, memory, disk, and network.

Image description

19. watch

  • Usage: Repeats a command at fixed intervals.
  • Command: watch -n 1 df -h
  • Description: Useful for monitoring outputs in real-time, such as disk usage.

Image description

Support if you found this helpful😉

No Money 🙅🏻‍♀️ just Subscribe

Do check: https://linktr.ee/DevOps_Descent
Youtube: https://shorturl.at/lVi2G

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (12)

Collapse
 
voyeg3r profile image
Sérgio Araújo • Edited

Have you tryied

jq '.' file.json
Enter fullscreen mode Exit fullscreen mode

Because most of the time cat is not needed.

even simple commands hide some tricks

mkdir -p lua/{core,plugins}
Enter fullscreen mode Exit fullscreen mode

But I would add gnu parallel on this list:

seq 4500 | parallel -j20 wget -c https://speechling.com/static/audio/male/english/english_{}.mp3
Enter fullscreen mode Exit fullscreen mode
Collapse
 
devops_descent profile image
DevOps Descent

Thanks!
I will update jq usage in my post.

parallel is a nice addition, I will cover this in my next blog post.
Stay tuned.

Collapse
 
kurealnum profile image
Oscar

If anyone's curious, btop is a much cleaner version of atop.

Collapse
 
devops_descent profile image
DevOps Descent

Glad someone shared, thanks 🤗

Collapse
 
programmerraja profile image
Boopathi

This is a great list! I'm bookmarking this for future reference. It's especially helpful to have the basic usage example included with each command.

Collapse
 
devops_descent profile image
DevOps Descent

Noted ✍️for the next post, thanks 🤗

Collapse
 
ankurk91 profile image
Ankur K

github.com/nvbn/thefuck
Must have 🥱

Collapse
 
devops_descent profile image
DevOps Descent

Thanks for this, the name caught me😆😆

Collapse
 
atlemagnussen profile image
Atle Magnussen

iptables is kind of deprecated now. It has been replaced by nftables. Iptables lives on as a compatibility layer with a translation from nftables rules.

Collapse
 
devops_descent profile image
DevOps Descent

Nice catch, thanks for the information 😉

Collapse
 
niranjan_pandit_81 profile image
Niranjan Pandit

netstat
Get info on open ports and the processes

Collapse
 
devops_descent profile image
DevOps Descent

Thanks for mentioning 🤗
I'll add this to the next blog

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay