r/LinuxTeck • • 5h ago Bravo

Did you know you can check the weather directly from your Linux terminal?

44 Upvotes

No browser, no weather app. Just run:

curl wttr.in

That's it. You'll get a weather forecast displayed right in your terminal using an ASCII-style interface.

You can even check a specific city:

curl wttr.in/London

A surprisingly fun use of curl beyond downloading files and testing APIs.

What other unusual or surprisingly useful Linux terminal commands do you use regularly?


r/LinuxTeck • • 6h ago

Verify LDAP Users in Linux Using ldapsearch - 139

Post image
6 Upvotes

Question: How do I verify a user in LDAP/AD exists before adding them?

Try:ldapsearch -x -H ldap://ldap.example.com -b 'dc=example,dc=com' -D 'cn=admin,dc=example,dc=com' -W '(uid=jsmith)' cn mail

Info: Queries LDAP/AD directories for matching users.

Examples:

$ ldapsearch -x -H ldap://server -b 'dc=example,dc=com' '(objectclass=user)' cn mail # Query AD user entries

$ ldapwhoami -x -D 'cn=admin,dc=example,dc=com' -W # Verify bind credentials

$ ldapsearch -LLL ... # Output clean LDIF without comments

Note: Install via sudo apt install ldap-utils. Use LDAPS (`ldaps://` or port 636) or StartTLS instead of cleartext LDAP in production, match AD attributes like `sAMAccountName` or `userPrincipalName`, and check `getent passwd` to confirm NSS resolution.

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 • • 18h ago

Quick Hosting Tip #1 - Know the four hosting types before you buy

Post image
4 Upvotes

r/LinuxTeck • • 1h ago

Senior DevOps engineers don't panic when production breaks. Or do they?

1 Upvotes

Experience teaches you how to troubleshoot, stay calm, and make better decisions under pressure. But even the most experienced engineers face uncertainty.

And with experienced professionals also facing layoffs across the industry, does seniority really bring the security people expect?

What's your take? Do senior engineers genuinely stay calmer during incidents, or have they just learned to hide the panic better?


r/LinuxTeck • • 2h ago

I’ve used Ubuntu for six months—what basics should I learn to understand it better?

Post image
1 Upvotes

I’ve used Ubuntu for six months—what basics should I learn to understand it better?’ve been using Ubuntu for about six months, but I still feel like I’m missing some basic knowledge. When I see terminal errors like the ones in my screenshot, I’m not sure where to start.I’d like to understand how Ub


r/LinuxTeck • • 5h ago

Tracing Nginx 502 Bad Gateway errors and broken upstreams visually over SSH (without installing a server agent)

Thumbnail gallery
1 Upvotes

Debugging a 502 Bad Gateway in Nginx usually means jumping between nginx -T, ss -tlnp, and /var/log/nginx/*.error.log to figure out which location block forwards traffic to a dead port or an offline upstream node.

This visual route map comes from Kubo (kubo.gemmi-e.com), an agentless desktop tool for Windows, macOS, and Linux that reads standard server outputs over SSH (nginx -T, ss -tlnp, openssl x509) and draws the full request path from domain to listening process.

What this Nginx route map (~/network/nginx) highlights at a glance:

  • Exact point of failure (502 on /ws): The /ws WebSocket location forwards traffic to port 8081, where nothing is currently listening (nothing listens · 502), pinpointing the broken route immediately instead of reading raw config blocks.
  • Degraded upstream pool (backend_nodes · 1 of 3 up): Shows which backend instances are active (127.0.0.1:3000), which port has nothing listening (127.0.0.1:3001), and which node is marked out of service (127.0.0.1:3002).
  • SSL certificate & traffic context: Displays certificate expiration countdown (27d left), active listening ports (80, 443), and live HTTP status codes from the access log (200, 301, 404, 502).