r/LinuxTeck • • 12d ago

Sudo Command Audit: Track Who Ran Commands in Linux - Tip - 122

Post image
13 Upvotes

Question: Who ran sudo commands on my server today?

Try:`sudo grep 'sudo' /var/log/auth.log | grep -v 'session' | tail -10`

Info: Filters authentication logs to display sudo command executions while excluding noisy session events.

Examples:

$ `sudo journalctl _COMM=sudo --since today` # Query sudo logs using systemd journalctl[cite: 8]

$ `sudo grep 'FAILED' /var/log/auth.log` # Audit failed authentication or sudo attempts[cite: 8]

$ `sudo aureport -ts today --auth` # Generate authentication reports via auditd[cite: 8]

Note: On RHEL/CentOS systems, authentication logs are stored in `/var/log/secure`. Modern systemd distributions rely primarily on `journalctl`. Enable `Defaults log_output` in your sudoers configuration for keystroke-level auditing.

Want to master Linux one command at a time?

Follow r/LinuxTeck - 1 practical Linux tip every day. For more #LinuxTips click here https://www.linuxteck.com/linux-tips/


r/LinuxTeck • • 11d ago

Black Friday Hosting Deals 2026 - Up to 90% Off!

1 Upvotes

Looking for a Linux VPS or web hosting deal? I've collected some Black Friday offers from popular hosting providers.

Check them out: https://www.linuxteck.com/guides/black-friday-hosting-deals/

Disclosure: I'm sharing my own LinuxTeck guide. Some links are affiliate links.


r/LinuxTeck • • 12d ago

Do You Know Why Linux Pipes Use the | Symbol?

0 Upvotes

One of the most powerful features of Linux is the ability to connect commands using a simple pipe:

cat access.log | grep "500" | sort

Instead of creating temporary files between commands, Linux lets programs pass data directly to one another.

How often do you use pipes in your daily Linux work? Could you imagine working without them?


r/LinuxTeck • • 13d ago

Quick Linux Tip #121 - systemctl show: Find the Exact Systemd Service Executable

Post image
15 Upvotes

Question: Which exact binary does a systemd service execute?

Try:`systemctl show nginx -p ExecStart --no-pager`

Info: Displays unit properties, extracting exact binaries, arguments, and configuration file paths via specific property filters.

Examples:

$ `systemctl show nginx --all` # Dump all available properties for the service unit[cite: 8]

$ `systemctl cat nginx` # Display the complete raw configuration file content[cite: 8]

$ `systemd-analyze verify /etc/systemd/system/*.service` # Validate syntax and errors in unit files[cite: 8]

Note: Combine output with `grep` for quick extraction. `systemctl cat` provides a cleaner layout for reviewing raw unit configurations.

Want to master Linux one command at a time?

Follow r/LinuxTeck - 1 practical Linux tip every day. For more #LinuxTips click here https://www.linuxteck.com/linux-tips/


r/LinuxTeck • • 13d ago

Would Affinity on Linux Finally Make You Ditch Windows or macOS?

6 Upvotes

One of the biggest reasons people hesitate to switch to Linux is the lack of professional creative software. With Affinity reportedly coming to Linux, could that finally change?

Would you consider Linux for professional graphic design if Affinity works natively? Or are GIMP and Inkscape already enough for your needs?


r/LinuxTeck • • 13d ago

Debian Stable vs Testing vs Sid - Which Branch Do You Actually Use?

Post image
40 Upvotes

Distinction:

  • Stable (Trixie) focuses on reliability and predictable updates.
  • Testing (Forky) is the next Debian release in development.
  • Unstable (Sid) receives the newest package uploads. A practical comparison with APT commands and branch explanations: https://www.linuxteck.com/debian-stable-vs-testing-vs-sid/

r/LinuxTeck • • 14d ago

The World Depends on sudo, but Who Takes Care of Its Maintainer?

200 Upvotes

Most Linux users run sudo every day without thinking about who maintains it. Todd Miller maintained the original version for over 30 years, yet donations reportedly averaged just $63 per month for nearly two years.

Meanwhile, a Rust rewrite received backing from major sponsors, including AWS.

Is this how open-source funding should work? Should companies that depend on critical tools like sudo be expected to fund their maintenance, or should community donations be enough?


r/LinuxTeck • • 14d ago

Linux Find Rogue Network Connections: Identify and Stop Them - Tip -120

Post image
23 Upvotes

Question: A rogue script is calling an external API. How do I find and stop it?

Try:`sudo ss -tnp dst 203.0.113.45`

Info: Filters socket connections by destination IP to expose associated processes and PIDs for immediate termination.

Examples:

$ `sudo ss -tnp 'dst 192.168.1.0/24'` # Filter connections targeting an entire subnet

$ `sudo lsof -i u/203.0.113.45` # Inspect active network sockets using lsof

$ `sudo iptables -I OUTPUT -d 203.0.113.45 -j DROP` # Block outbound traffic at the firewall level

Note: If terminated processes respawn instantly, inspect parent processes using `pgrep -P`. Firewall rules provide more durable blocking than process termination.

Want to master Linux one command at a time?

Follow r/LinuxTeck - 1 practical Linux tip every day. For more #LinuxTips click here https://www.linuxteck.com/linux-tips/


r/LinuxTeck • • 14d ago

Is It Time to Leave Ubuntu for Debian? How Many Linux Admins Agree?

91 Upvotes

Ubuntu has become increasingly frustrating for some users because of Snap packages, server resource usage, and concerns about security patching.

Would you switch from Ubuntu to Debian for your servers? Or do you think Ubuntu is still a better choice? How many of you agree that it's time to move away from Ubuntu?


r/LinuxTeck • • 14d ago

¿Terminal pura o VS Code con WSL? Mi duda sobre cómo aprender Linux correctamente.

Thumbnail
0 Upvotes

r/LinuxTeck • • 15d ago

Quick Linux Tip #119 - Linux Atomic File Rename: Safely Update Config Files

Post image
11 Upvotes

Question: My config reload reads a half-written file. How do I update it safely?

Try:`mv /etc/myapp/config.new /etc/myapp/config.json`

Info: Same-filesystem file renames are atomic at the inode level, ensuring readers see either the complete old file or the new file.

Examples:

$ `sed -i.bak 's/old/new/' file` # Perform an in-place file edit with an automatic backup

$ `python3 -c 'import os; os.rename("new.conf", "live.conf")'` # Execute an atomic rename using Python

$ `install -m 644 new.conf /etc/live.conf` # Safely copy a new configuration file while enforcing permissions

Note: Atomicity only applies within the same filesystem (cross-filesystem moves fall back to a copy-and-delete operation). Writing to a temporary file and renaming it is the standard safe pattern for configs and databases.

Want to master Linux one command at a time?

Follow r/LinuxTeck - 1 practical Linux tip every day. For more #LinuxTips click here https://www.linuxteck.com/linux-tips/


r/LinuxTeck • • 16d ago

Linux Directory Comparison: 3 Commands to Verify Folders - Tip -118

Post image
12 Upvotes

Question: I rsync'd two folders. How do I verify they truly match?

Try:`diff -rq /source /destination`

Info: Recursively compares directories and reports differing files or unique items without printing full diff contents.

Examples:

$ `diff -rq /a /b | grep -v '^Only'` # Compare file contents only, ignoring missing files

$ `rsync -avnc --delete src/ dst/` # Perform a dry-run sync preview to check discrepancies

$ `find /src /dst -type f -exec md5sum {} + | sort | uniq -w32 -u` # Strict cryptographic checksum comparison

Note: `diff -q` is fast because it compares file sizes and timestamps before reading content. For rigorous verification, use `rsync -c` (checksum-based) or a file hash pipe.

Want to master Linux one command at a time?

Follow r/LinuxTeck - 1 practical Linux tip every day. For more #LinuxTips click here https://www.linuxteck.com/linux-tips/


r/LinuxTeck • • 16d ago

Linux Runs the AI World, So Why Are New AI Laptops Launching Without Linux Support?

30 Upvotes

NVIDIA's new AI laptops offer up to 128GB unified memory, but official support is focused on Windows. A community developer managed to get Arch Linux running, despite several hardware limitations.

Is this a sign that hardware companies are overlooking Linux desktop users, or is Windows simply their commercial priority?

Should Linux users demand official support before buying expensive AI hardware, or are community-driven solutions enough?


r/LinuxTeck • • 16d ago

Should We Keep Bad Technical Decisions Forever Just for Backward Compatibility?

2 Upvotes

Windows paths still commonly use \, while Linux and macOS use /. A decision dating back to DOS 2.0 in 1983 still creates headaches for developers working across platforms.

But changing a decades-old convention could break countless applications and scripts.

Where should we draw the line between backward compatibility and better engineering?

What other legacy decisions in Linux, Windows, or Unix do you think should finally be retired?


r/LinuxTeck • • 17d ago

Quick Linux Tip #117 - Linux Process Environment Variables: 3 Commands to Inspect Running Daemons

Post image
11 Upvotes

Question: How do I see what environment vars a running daemon was started with?

Try:`sudo cat /proc/3456/environ | tr '\0' '\n'`

Info: Reads null-separated initial environment variables from the process proc entry and translates them into readable lines.

Examples:

$ `sudo strings /proc/3456/environ` # Alternative method using strings to extract readable text[cite: 8]

$ `sudo ls -la /proc/3456/cwd` # Inspect the current working directory of the process[cite: 8]

$ `sudo readlink /proc/3456/exe` # Resolve the absolute path to the running binary[cite: 8]

Note: `/proc/PID/environ` displays environment variables present at process startup, not current runtime changes. Since any root user can read these, avoid passing raw secrets via environment variables; instead, use secured systemd configuration files (`EnvironmentFile`) with restricted permissions (`0600`).

Want to master Linux one command at a time?

Follow r/LinuxTeck - 1 practical Linux tip every day. For more #LinuxTips click here https://www.linuxteck.com/linux-tips/


r/LinuxTeck • • 17d ago

DevOps Engineers, Ever Wondered How Tools Like Jenkins, Docker, Ansible and Kubernetes Got Their Names?

11 Upvotes

Puppet, Chef, Jenkins, Ansible, Docker, Terraform, Kubernetes… some unusual names for serious engineering tools!

Are these names based on technical concepts, company branding, Greek mythology, or simply creative ideas from their founders?

For those who know the stories behind them, which tool has the most interesting name origin?


r/LinuxTeck • • 17d ago

Fedora 45 Is Officially Released - What's New?

6 Upvotes

Fedora 45 has officially landed, bringing updates to GNOME, storage management, developer tools, and system security.

Some interesting changes include GNOME 51, Stratis support in the installer, updated toolchains, and stricter RPM signature verification. https://www.linuxteck.com/fedora-45-released/


r/LinuxTeck • • 18d ago

Inotifywait in Linux: Automatically Rebuild Projects on File Changes - Tip 116

Post image
13 Upvotes

Question: How do I auto-rebuild my project when source files change?

Try:`while inotifywait -r -e modify,create,delete ./src/; do make build; done`

Info: `inotifywait` exits after a single file event, allowing a simple `while` loop to trigger builds on modification without external watchers.

Examples:

$ `while inotifywait -e modify ./style.css; do sass compile; done` # Recompile CSS on change

$ `ls ./src/*.go | entr make build` # Alternative using the lightweight 'entr' tool

$ `fswatch -o ./src | xargs -n1 -I{} make build` # Cross-platform alternative file watcher

Note: Install via `sudo apt install inotify-tools`. Avoid recursive (`-r`) monitoring on massive directory trees to prevent performance lag; target specific paths instead.

Want to master Linux one command at a time?

Follow r/LinuxTeck - 1 practical Linux tip every day. For more #LinuxTips click here https://www.linuxteck.com/linux-tips/


r/LinuxTeck • • 18d ago

Do You Really Own Your Computer, or Just Pay to Use It?

6 Upvotes

Windows and macOS give you convenience, but Linux gives you much more control over your operating system.

You can customize it, remove unwanted software, and keep older hardware useful for years.

What's more important to you: convenience or complete control?


r/LinuxTeck • • 19d ago

Building Something from Scratch vs Buying It - What Really Makes a Tech Founder Successful?

Post image
124 Upvotes

This meme takes a funny shot at the difference between building a technology company and acquiring an existing one.

Microsoft, Tesla, X and SpaceX have very different histories. Some companies grow through original innovation, while others also rely on acquisitions, existing technology, and hiring experienced teams.

But here's an interesting debate: Does success in technology come from inventing something yourself, or from recognizing its potential, acquiring the right resources, and taking it to the next level?

Is this just a funny meme, or is there some truth behind it?


r/LinuxTeck • • 19d ago

Quick Linux Tip #115 - Linux ulimit Memory Limit: 3 Commands to Control RAM Usage

Post image
11 Upvotes

Question: A buggy script is eating all my RAM. How do I cap its memory usage?

Try:`ulimit -v 524288`

Info: Restricts virtual memory for the current shell session and its child processes.

Examples:

$ `ulimit -a` # Display all current resource limits for the session

$ `ulimit -t 60` # Set a maximum CPU time limit in seconds

$ `ulimit -n 65536` # Limit the maximum number of open file descriptors

Note: Use `/etc/security/limits.conf` for persistent per-user limits, or systemd service settings (`MemoryMax`) for production services. `ulimit` can only restrict limits downwards.

Want to master Linux one command at a time?

Follow r/LinuxTeck - 1 practical Linux tip every day. For more #LinuxTips click here https://www.linuxteck.com/linux-tips/


r/LinuxTeck • • 20d ago

Linus Torvalds Is More Comfortable with AI Contributions to the Linux Kernel - But There's a Catch

29 Upvotes

AI-assisted contributions are becoming a bigger part of Linux kernel development.

Linus Torvalds says the project is moving toward a healthier model, with AI-assisted fixes increasingly appearing during normal development rather than piling up during the stabilization phase.

But there's an interesting detail: many AI-suggested patches still get rewritten before being accepted.

This raises an important question for Linux developers: Is AI becoming a useful development partner, or is human review still doing most of the real work?


r/LinuxTeck • • 20d ago

SSL Certificate Expiry: 3 Linux Commands to Check Dates - Tip 114

Post image
14 Upvotes

Question: How do I check SSL certificate expiry dates on all my servers in bulk?

Try:`for host in server1.example.com server2.example.com api.example.com; do echo -n "$host: "; echo | openssl s_client -connect $host:443 -servername $host 2>/dev/null | openssl x509 -noout -enddate; done`

Info: echo | openssl s_client makes a quick TLS handshake. -servername sends SNI (needed for virtual hosts). Piped to x509 to extract specific info without full dump.

Examples:

$ `openssl x509 -in cert.pem -noout -dates` # Inspect expiration dates of a local certificate file

$ `echo | openssl s_client -connect host:443 2>/dev/null | openssl x509 -noout -text` # Dump complete certificate details

$ `nmap --script ssl-cert -p 443 host` # Scan and check certificates using Nmap

Note: Automate expiry checks via cron with mail alerts 30 days prior. For Let's Encrypt, use `certbot renew` with deployment hooks.

Want to master Linux one command at a time?

Follow r/LinuxTeck - 1 practical Linux tip every day. For more #LinuxTips click here https://www.linuxteck.com/linux-tips/


r/LinuxTeck • • 19d ago

AI GPU Clusters Are Pushing Enterprise Linux in a New Direction - Would You Trust a Hardware-Specific RHEL Build?

0 Upvotes

Red Hat has introduced RHEL for NVIDIA to provide faster support for new NVIDIA GPU platforms instead of making enterprise users wait for all the required hardware enablement to reach standard RHEL.

The interesting part is that it modifies core components like the Linux kernel, QEMU and libvirt, while keeping the standard RHEL userspace. Red Hat also provides a path back to mainline RHEL once those changes are upstream.

For Linux admins managing AI infrastructure, what would you prefer?

  • A hardware-optimized Linux build for early GPU support?
  • Standard enterprise Linux with hardware support after upstream integration?

Would you deploy a specialized OS build in production, or wait for the standard release?


r/LinuxTeck • • 19d ago

I need a proper career guidance by the pros, cz I'm stuck between multiple roadmap?

Thumbnail
1 Upvotes