r/LinuxTeck • • 12h ago

What are the first security habits every new Linux user should learn?

20 Upvotes

When moving from Windows to Linux, many beginners immediately look for antivirus software.

But experienced Linux users often recommend something different: keep your system updated, install software from trusted repositories, avoid running commands you don't understand, use strong passwords, and maintain regular backups.

A firewall and tools like SELinux or AppArmor can also add protection, depending on your setup.

If you were helping someone switch to Linux for the first time, what three security practices would you teach them before anything else?


r/LinuxTeck • • 13h ago

Quick Linux Tip #140 - Bash Strict Mode: Use set -euo pipefail Safely

Post image
6 Upvotes

Question: How do I chain commands safely in shell scripts?

Try:set -euo pipefail && cd /opt/app && git pull && make test && make deploy && systemctl reload myapp

Info: Exits on error and chains safe commands.

Examples:

$ command1 || command2 # Run fallback command only if command1 fails

$ command1 || { echo 'fail'; exit 1; } # Print an error message and exit on failure

$ command1 ; command2 # Run sequentially regardless of exit status (risky in scripts)

Note: Put `set -euo pipefail` near the top of scripts to catch failed commands, unset variables, and failed pipeline stages. Use `&&` and `||` for conditional flow instead of `;` when failures must stop execution.

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

Offshore VPS Hosting – Privacy, Reliability or Just Marketing?

Thumbnail reddit.com
2 Upvotes

r/LinuxTeck • • 5h ago

Linux vs Ubuntu - why do people still confuse the two? 😄

0 Upvotes

I still see people asking whether Linux and Ubuntu are different operating systems.

The simple explanation:

  • Linux is the kernel.
  • Ubuntu is a Linux distribution built around that kernel.
  • Debian, Fedora, Arch, and Linux Mint are other examples of Linux distributions.

So, using Ubuntu means you're already using Linux!

So, when you first started learning Linux, did you understand the difference between a kernel and a distribution, or was it confusing at first?