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