Quick Linux Tip #6
Question: What files is a specific process using?
Try: lsof -p 3456
Info: lsof shows all files, sockets, and connections used by a process. Great for troubleshooting.
Examples:
$ lsof -p 3456
$ lsof -i :8080
$ lsof -u username
Note:Use -i for network connections. -i :PORT shows process using that port.
Follow @LinuxTeck for more #LinuxTips
Question: What files is a specific process using?
Try: lsof -p 3456
Info: lsof shows all files, sockets, and connections used by a process. Great for troubleshooting.
Examples:
$ lsof -p 3456
$ lsof -i :8080
$ lsof -u username
Note:Use -i for network connections. -i :PORT shows process using that port.
Follow @LinuxTeck for more #LinuxTips
Quick Linux Tip #7
Question: How do I speed up processing many files using all CPU cores?
Try: find /images -name '*.jpg' | parallel -j+0 'convert {} -resize 800x600 {}.resized'
Info: GNU parallel executes commands in parallel across all CPU cores. Dramatically speeds up batch processing of files, downloads, or any repeatable task.
Examples:
$ parallel -j 4 gzip ::: *.log
$ cat urls.txt | parallel -j 10 wget {}
$ find . -name '*.mp4' | parallel ffmpeg -i {} -vcodec h264 {.}.mp4
Note:Install: apt install parallel. -j+0 uses all cores, -j N uses N processes. ::: passes arguments directly. Perfect for CPU-intensive tasks.
Follow @LinuxTeck for more #LinuxTips
Question: How do I speed up processing many files using all CPU cores?
Try: find /images -name '*.jpg' | parallel -j+0 'convert {} -resize 800x600 {}.resized'
Info: GNU parallel executes commands in parallel across all CPU cores. Dramatically speeds up batch processing of files, downloads, or any repeatable task.
Examples:
$ parallel -j 4 gzip ::: *.log
$ cat urls.txt | parallel -j 10 wget {}
$ find . -name '*.mp4' | parallel ffmpeg -i {} -vcodec h264 {.}.mp4
Note:Install: apt install parallel. -j+0 uses all cores, -j N uses N processes. ::: passes arguments directly. Perfect for CPU-intensive tasks.
Follow @LinuxTeck for more #LinuxTips
The Linux
A handy tool for backups, compression, maintenance tasks, and automation.
Read the guide:
https://www.linuxteck.com/batch-command-in-linux/
#Linux #DevOps #SysAdmin #Automation #linuxteck
batch command lets you queue heavy jobs and automatically runs them when the system load is low.A handy tool for backups, compression, maintenance tasks, and automation.
Read the guide:
https://www.linuxteck.com/batch-command-in-linux/
#Linux #DevOps #SysAdmin #Automation #linuxteck
LinuxTeck
Batch Command In Linux: 11 Essential Tips And Examples
Learn the batch command in Linux to schedule jobs that only run once system load drops, with syntax, options, and real terminal examples.
Linux PAM controls authentication for SSH, sudo, login, and many other services.
This guide explains how PAM works, the authentication flow, configuration files, common modules, and real-world use cases with easy-to-follow diagrams.
https://www.linuxteck.com/linux-pam-architecture-explained/
#linuxteck #Linux #SysAdmin #DevOps #CyberSecurity
This guide explains how PAM works, the authentication flow, configuration files, common modules, and real-world use cases with easy-to-follow diagrams.
https://www.linuxteck.com/linux-pam-architecture-explained/
#linuxteck #Linux #SysAdmin #DevOps #CyberSecurity
LinuxTeck
Linux PAM Architecture Explained: 5 Practical Examples
Learn how Linux PAM architecture works with 5 practical config examples covering syntax, control flags, and real troubleshooting steps.
Quick Linux Tip #9
Question: How do I see all processes with their container and resource limits?
Try: systemd-cgls --unit=docker.service
Info: systemd-cgls shows the cgroup tree with all processes organized by their control groups. Perfect for understanding container isolation and resource allocation.
Examples:
$ systemd-cgls --unit=user.slice
$ systemd-cgtop # Real-time cgroup resource usage
$ cat /proc/1234/cgroup # Show cgroups for specific PID
Note: Understand container resource isolation. Combine with 'systemd-cgtop' for real-time CPU/memory per cgroup. Essential for container troubleshooting.
Follow @LinuxTeck for more #LinuxTips
Question: How do I see all processes with their container and resource limits?
Try: systemd-cgls --unit=docker.service
Info: systemd-cgls shows the cgroup tree with all processes organized by their control groups. Perfect for understanding container isolation and resource allocation.
Examples:
$ systemd-cgls --unit=user.slice
$ systemd-cgtop # Real-time cgroup resource usage
$ cat /proc/1234/cgroup # Show cgroups for specific PID
Note: Understand container resource isolation. Combine with 'systemd-cgtop' for real-time CPU/memory per cgroup. Essential for container troubleshooting.
Follow @LinuxTeck for more #LinuxTips
Quick Linux Tip #10
Question: How do I capture only specific HTTP traffic to a specific host?
Try: sudo tcpdump -i eth0 -w capture.pcap 'host 192.168.1.100 and port 80 and tcp[13] & 2 != 0'
Info: tcpdump captures network packets with BPF filters. This example captures only SYN packets (TCP handshake start) to a specific host on port 80. Perfect for debugging network issues.
Examples:
$ sudo tcpdump -i any -n 'port 443 and host github.com'
$ sudo tcpdump -i eth0 -A 'tcp port 80' # Show ASCII payload
$ sudo tcpdump -r capture.pcap 'tcp[tcpflags] & (tcp-syn|tcp-ack) == tcp-syn'
Note: Use -w to save, -r to read pcap files. BPF filters: 'tcp[13] & 2' checks SYN flag. Open .pcap files in Wireshark for GUI analysis.
Follow @LinuxTeck for more #LinuxTips
Question: How do I capture only specific HTTP traffic to a specific host?
Try: sudo tcpdump -i eth0 -w capture.pcap 'host 192.168.1.100 and port 80 and tcp[13] & 2 != 0'
Info: tcpdump captures network packets with BPF filters. This example captures only SYN packets (TCP handshake start) to a specific host on port 80. Perfect for debugging network issues.
Examples:
$ sudo tcpdump -i any -n 'port 443 and host github.com'
$ sudo tcpdump -i eth0 -A 'tcp port 80' # Show ASCII payload
$ sudo tcpdump -r capture.pcap 'tcp[tcpflags] & (tcp-syn|tcp-ack) == tcp-syn'
Note: Use -w to save, -r to read pcap files. BPF filters: 'tcp[13] & 2' checks SYN flag. Open .pcap files in Wireshark for GUI analysis.
Follow @LinuxTeck for more #LinuxTips
Cloudways saves time with managed hosting, automated backups, security, and support. Vultr gives you lower raw infrastructure cost, full root access, Kubernetes, GPU options, and complete control.
We tested both across real production workloads. The better choice comes down to one question: Is your time or your budget more limited?
Read the full hands-on comparison: https://www.linuxteck.com/guides/cloudways-vs-vultr/
#Cloudways #Vultr #CloudHosting #Linux #DevOps #SysAdmin #WebHosting #linuxteck
We tested both across real production workloads. The better choice comes down to one question: Is your time or your budget more limited?
Read the full hands-on comparison: https://www.linuxteck.com/guides/cloudways-vs-vultr/
#Cloudways #Vultr #CloudHosting #Linux #DevOps #SysAdmin #WebHosting #linuxteck
Quick Linux Tip #11
Question: How do I debug a running process without stopping it?
Try: sudo gdb -p 1234 -batch -ex 'thread apply all bt' -ex 'quit'
Info: gdb can attach to running processes and dump stack traces without stopping them. Essential for debugging production issues where you cannot restart the service.
Examples:
$ sudo gdb -p $(pgrep nginx) -batch -ex 'bt'
$ sudo strace -p 1234 -f -e trace=network
$ sudo perf record -p 1234 -g sleep 30
Note: gdb briefly pauses the process. For production, use 'perf' or 'strace' for less impact. Requires debug symbols for best results.
Follow @LinuxTeck for more #LinuxTips
Question: How do I debug a running process without stopping it?
Try: sudo gdb -p 1234 -batch -ex 'thread apply all bt' -ex 'quit'
Info: gdb can attach to running processes and dump stack traces without stopping them. Essential for debugging production issues where you cannot restart the service.
Examples:
$ sudo gdb -p $(pgrep nginx) -batch -ex 'bt'
$ sudo strace -p 1234 -f -e trace=network
$ sudo perf record -p 1234 -g sleep 30
Note: gdb briefly pauses the process. For production, use 'perf' or 'strace' for less impact. Requires debug symbols for best results.
Follow @LinuxTeck for more #LinuxTips
❤1
Learn Perl Scripting for Shell Users: From One-Liners to Automation
Read more: https://www.linuxteck.com/learn-perl-scripting-for-shell-users/
Already comfortable with shell scripting? Perl can be a useful next step for text processing, regex, log analysis, reports, and Linux automation.
This practical guide covers Perl scripts, one-liners, file handling, regex, cron jobs, email reports, and debugging with sysadmin-focused examples.
#Linux #Perl #SysAdmin #Automation #ShellScripting #LinuxTeck
Read more: https://www.linuxteck.com/learn-perl-scripting-for-shell-users/
Already comfortable with shell scripting? Perl can be a useful next step for text processing, regex, log analysis, reports, and Linux automation.
This practical guide covers Perl scripts, one-liners, file handling, regex, cron jobs, email reports, and debugging with sysadmin-focused examples.
#Linux #Perl #SysAdmin #Automation #ShellScripting #LinuxTeck
LinuxTeck
Learn Perl Scripting For Shell Users ( Part 33 / 34) | LinuxTeck
Learn perl scripting for shell users with real script examples, common mistakes, and practical tips to move beyond bash pipes and one-liners.
Top 50 Bash Script Basics Interview Questions
50 beginner questions covering shebangs, permissions, script execution, variables, user input, exit codes, and practical code-reading exercises.
Read Part 4 : https://www.linuxteck.com/write-your-first-bash-script/
#LinuxTeck #Linux #Bash #SysAdmin #DevOps
50 beginner questions covering shebangs, permissions, script execution, variables, user input, exit codes, and practical code-reading exercises.
Read Part 4 : https://www.linuxteck.com/write-your-first-bash-script/
#LinuxTeck #Linux #Bash #SysAdmin #DevOps
LinuxTeck
Write Your First Bash Script: 50 Essential Interview Questions (Part 4 / 8)
Learn to write your first bash script the right way shebang lines, permissions, variables, and 50 real interview questions beginners actually get asked.
Quick Linux Tip #12
Question: How do I find which process is slowly eating my RAM?
Try: watch -n 5 'ps -eo pid,user,vsz,rss,comm --sort=-rss | head -20'
Info: watch runs the command repeatedly showing memory trends. RSS shows physical memory in KB. If a process's RSS keeps growing, you have a leak.
Examples:
$ watch -n 1 'free -m'
$ smem -tk -s rss # More accurate memory reporting
$ sudo pmap -x 1234 | tail -1 # Detailed memory map
Note: smem is more accurate than ps for shared memory. Install: apt install smem. Monitor over hours to detect slow leaks.
Follow @LinuxTeck for more #LinuxTips
Question: How do I find which process is slowly eating my RAM?
Try: watch -n 5 'ps -eo pid,user,vsz,rss,comm --sort=-rss | head -20'
Info: watch runs the command repeatedly showing memory trends. RSS shows physical memory in KB. If a process's RSS keeps growing, you have a leak.
Examples:
$ watch -n 1 'free -m'
$ smem -tk -s rss # More accurate memory reporting
$ sudo pmap -x 1234 | tail -1 # Detailed memory map
Note: smem is more accurate than ps for shared memory. Install: apt install smem. Monitor over hours to detect slow leaks.
Follow @LinuxTeck for more #LinuxTips
Build Reliable Linux Storage with RAID
Read the full guide: https://www.linuxteck.com/build-reliable-linux-storage-with-raid/
RAID is more than combining disks. The right RAID level can improve performance, add redundancy, and help keep systems running when a drive fails.
This practical guide covers RAID 0, 1, 5, 6, and 10, along with mdadm commands, RAID monitoring, failed disk replacement, and rebuild management.
#Linux #RAID #LinuxAdmin #SysAdmin #Storage #mdadm #linuxteck
Read the full guide: https://www.linuxteck.com/build-reliable-linux-storage-with-raid/
RAID is more than combining disks. The right RAID level can improve performance, add redundancy, and help keep systems running when a drive fails.
This practical guide covers RAID 0, 1, 5, 6, and 10, along with mdadm commands, RAID monitoring, failed disk replacement, and rebuild management.
#Linux #RAID #LinuxAdmin #SysAdmin #Storage #mdadm #linuxteck
Quick Linux Tip #13
Question: I deleted a log file but the app is still writing to it. Can I recover it?
Try: sudo ls -la /proc/1234/fd/
Info: Linux keeps deleted files on disk while any process has them open. /proc/PID/fd/ shows file descriptors with (deleted) marker for such files. Copy from there to recover.
Examples:
$ sudo lsof +L1 # Find all deleted-but-open files
$ sudo ls -la /proc/$(pgrep nginx)/fd/
$ sudo cp /proc/1234/fd/1 recovered.log
Note: Two steps: identify FD number, then copy. Works only while process runs. Restarting the process = data lost forever.
Follow @LinuxTeck for more #LinuxTips
Question: I deleted a log file but the app is still writing to it. Can I recover it?
Try: sudo ls -la /proc/1234/fd/
Info: Linux keeps deleted files on disk while any process has them open. /proc/PID/fd/ shows file descriptors with (deleted) marker for such files. Copy from there to recover.
Examples:
$ sudo lsof +L1 # Find all deleted-but-open files
$ sudo ls -la /proc/$(pgrep nginx)/fd/
$ sudo cp /proc/1234/fd/1 recovered.log
Note: Two steps: identify FD number, then copy. Works only while process runs. Restarting the process = data lost forever.
Follow @LinuxTeck for more #LinuxTips
DigitalOcean vs Vultr: Which Cloud VPS Wins for Developers in 2026?
Read the full comparison and choose the right platform for your workload : https://www.linuxteck.com/guides/digitalocean-vs-vultr/
DigitalOcean or Vultr? The better choice depends on what you actually need.
DigitalOcean stands out for managed services, strong documentation, and less operational overhead. Vultr brings raw performance, competitive pricing, and wider global reach.
Our comparison breaks down pricing, performance, Kubernetes, security, DDoS protection, managed services, and real-world use cases.
#LinuxTeck #DigitalOcean #Vultr #CloudHosting #Linux #DevOps #CloudComputing #VPS
Read the full comparison and choose the right platform for your workload : https://www.linuxteck.com/guides/digitalocean-vs-vultr/
DigitalOcean or Vultr? The better choice depends on what you actually need.
DigitalOcean stands out for managed services, strong documentation, and less operational overhead. Vultr brings raw performance, competitive pricing, and wider global reach.
Our comparison breaks down pricing, performance, Kubernetes, security, DDoS protection, managed services, and real-world use cases.
#LinuxTeck #DigitalOcean #Vultr #CloudHosting #Linux #DevOps #CloudComputing #VPS
Kinsta delivers strong performance, managed backups, staging, and 24/7 support, but the $35/month starting price is not for every WordPress site.
Read the full review : https://www.linuxteck.com/guides/kinsta-review/
Our Kinsta Review 2026 looks at where the premium price makes sense and where it does not.
#LinuxTeck #Kinsta #WordPress
Read the full review : https://www.linuxteck.com/guides/kinsta-review/
Our Kinsta Review 2026 looks at where the premium price makes sense and where it does not.
#LinuxTeck #Kinsta #WordPress
Quick Linux Tip #14
Question: How do I make /var/www/site accessible at /home/linuxteck/website too?
Try: sudo mount --bind /var/www/site /home/linuxteck/website
Info: Bind mounts make the same content visible at multiple paths. No copying, no symlinks. Both paths refer to the same underlying files.
Examples:
$ sudo mount --bind /source /destination
$ sudo mount --bind -o ro /etc /backup/etc_ro # Read-only bind
$ sudo umount /home/linuxteck/website
Note: Persist by adding to /etc/fstab: '/var/www/site /home/linuxteck/website none bind 0 0'. Used heavily in containers and chroots.
Follow @LinuxTeck for more #LinuxTips
Question: How do I make /var/www/site accessible at /home/linuxteck/website too?
Try: sudo mount --bind /var/www/site /home/linuxteck/website
Info: Bind mounts make the same content visible at multiple paths. No copying, no symlinks. Both paths refer to the same underlying files.
Examples:
$ sudo mount --bind /source /destination
$ sudo mount --bind -o ro /etc /backup/etc_ro # Read-only bind
$ sudo umount /home/linuxteck/website
Note: Persist by adding to /etc/fstab: '/var/www/site /home/linuxteck/website none bind 0 0'. Used heavily in containers and chroots.
Follow @LinuxTeck for more #LinuxTips
Quick Linux Tip #15
Question: How do I delete 100,000 tiny cache files quickly?
Try: time find /tmp/cach -type f -name '*.tmp' -print0 | xargs -0 -n 100 -P 8 rm
Info: -print0 outputs null-separated filenames. -0 tells xargs to expect them. -n 100 batches 100 files per rm call. -P 8 runs 8 parallel processes.
Examples:
$ find /var/log -name '*.gz' -mtime +30 -print0 | xargs -0 -P 4 rm
$ find /data -name '*.raw' -print0 | xargs -0 -P 8 -I {} convert {} {}.jpg
$ find /tmp -type d -empty -print0 | xargs -0 -P 4 rmdir
Note: Use nproc to see CPU count. -n batching avoids 'argument list too long' errors. Massive speedup vs serial deletion.
Follow @LinuxTeck for more #LinuxTips
Question: How do I delete 100,000 tiny cache files quickly?
Try: time find /tmp/cach -type f -name '*.tmp' -print0 | xargs -0 -n 100 -P 8 rm
Info: -print0 outputs null-separated filenames. -0 tells xargs to expect them. -n 100 batches 100 files per rm call. -P 8 runs 8 parallel processes.
Examples:
$ find /var/log -name '*.gz' -mtime +30 -print0 | xargs -0 -P 4 rm
$ find /data -name '*.raw' -print0 | xargs -0 -P 8 -I {} convert {} {}.jpg
$ find /tmp -type d -empty -print0 | xargs -0 -P 4 rmdir
Note: Use nproc to see CPU count. -n batching avoids 'argument list too long' errors. Massive speedup vs serial deletion.
Follow @LinuxTeck for more #LinuxTips
Still using
The Linux
Learn practical socket monitoring, connection filtering, listening ports, and troubleshooting examples.
📖 https://www.linuxteck.com/ss-command-in-linux/
#Linux #SysAdmin #DevOps #Networking #linuxteck
netstat?The Linux
ss command is faster, more powerful, and installed by default on most modern distributions.Learn practical socket monitoring, connection filtering, listening ports, and troubleshooting examples.
📖 https://www.linuxteck.com/ss-command-in-linux/
#Linux #SysAdmin #DevOps #Networking #linuxteck
LinuxTeck
12 Simple Ss Command In Linux Examples You Need
Learn the ss command in Linux with 12 practical examples covering listening ports, TCP/UDP filters, and finding the process behind any open port.
Quick Linux Tip #16
Question: Why is my repeated SSH connection so slow, and how do I fix it?
Try: cat >> ~/.ssh/config << 'EOF' Host * ControlMaster auto ControlPath ~/.ssh/cm-%r@%h:%p ControlPersist 10m EOF
Info: SSH multiplexing reuses the first connection for subsequent sessions. ControlMaster creates a master socket, ControlPersist keeps it alive for 10 minutes.
Examples:
$ ssh -O check user@server # Verify master exists
$ ssh -O stop user@server # Close master connection
$ ssh -O exit user@server # Force close
Note: Massive speedup for scripts/CI/CD that ssh repeatedly. Second connection was 48x faster in the example above.
Follow @LinuxTeck for more #LinuxTips
Question: Why is my repeated SSH connection so slow, and how do I fix it?
Try: cat >> ~/.ssh/config << 'EOF' Host * ControlMaster auto ControlPath ~/.ssh/cm-%r@%h:%p ControlPersist 10m EOF
Info: SSH multiplexing reuses the first connection for subsequent sessions. ControlMaster creates a master socket, ControlPersist keeps it alive for 10 minutes.
Examples:
$ ssh -O check user@server # Verify master exists
$ ssh -O stop user@server # Close master connection
$ ssh -O exit user@server # Force close
Note: Massive speedup for scripts/CI/CD that ssh repeatedly. Second connection was 48x faster in the example above.
Follow @LinuxTeck for more #LinuxTips
Debian 13.6 Released: 244 Important Fixes Every Linux User Should Know
Debian 13.6 "Trixie" is now available with 120 security advisories and 124 stability fixes, along with important Secure Boot improvements and updates to packages like Apache, Curl, Samba, Python 3.13, QEMU, Wireshark, and more.
If you're running Debian in production or planning an upgrade, this release is well worth reviewing.
Read the full breakdown:
https://www.linuxteck.com/debian-13-6-brings-244-important-fixes-to-linux/
#Linux #Debian #Debian13 #OpenSource #LinuxAdmin #SysAdmin #CyberSecurity #LinuxNews #LinuxTeck
Debian 13.6 "Trixie" is now available with 120 security advisories and 124 stability fixes, along with important Secure Boot improvements and updates to packages like Apache, Curl, Samba, Python 3.13, QEMU, Wireshark, and more.
If you're running Debian in production or planning an upgrade, this release is well worth reviewing.
Read the full breakdown:
https://www.linuxteck.com/debian-13-6-brings-244-important-fixes-to-linux/
#Linux #Debian #Debian13 #OpenSource #LinuxAdmin #SysAdmin #CyberSecurity #LinuxNews #LinuxTeck
LinuxTeck
Debian 13.6 Release Brings 244 Important Linux Fixes
Debian 13.6 lands with 120 security advisories and 124 stability fixes, plus a Secure Boot update every Trixie admin should apply now.
Quick Linux Tip #17
Question: Are my source and backup directories truly identical?
Try: diff <(cd /source && find . -type f -exec md5sum {} + | sort) <(cd /backup && find . -type f -exec md5sum {} + | sort)
Info: Combines find, md5sum, sort, and process substitution to compare directories by content, not just names. Detects even single-byte modifications.
Examples:
$ rsync -avnc /source/ /destination/ # Dry-run checksum check
$ find /a -type f | xargs sha256sum | sort > /tmp/a.sums
$ sha256sum -c backup.sums # Verify files against saved hashes
Note: Use sha256sum for security-critical checks. rsync -c does similar but modifies filesystem. Perfect for backup verification.
Follow @LinuxTeck for more #LinuxTips
Question: Are my source and backup directories truly identical?
Try: diff <(cd /source && find . -type f -exec md5sum {} + | sort) <(cd /backup && find . -type f -exec md5sum {} + | sort)
Info: Combines find, md5sum, sort, and process substitution to compare directories by content, not just names. Detects even single-byte modifications.
Examples:
$ rsync -avnc /source/ /destination/ # Dry-run checksum check
$ find /a -type f | xargs sha256sum | sort > /tmp/a.sums
$ sha256sum -c backup.sums # Verify files against saved hashes
Note: Use sha256sum for security-critical checks. rsync -c does similar but modifies filesystem. Perfect for backup verification.
Follow @LinuxTeck for more #LinuxTips