September 30, 2013 · commandment hacks learnshell linux newbie noob raspberrypi root rules security server tricks

10 commandments for Linux users

I was browsing the web and I found The 10 Commandments for Linux Users that might be useful for new Linux users. Before I get to my thoughts on them, lets just read the commandments:

and the ROOT user did speak

The10Commandments

1. Thou shalt not log in as root.
Use "sudo" or "su -" for administrative tasks.

2. Thou shalt use the package manager when possible.
Sometimes installing from source code can't be avoided, but when you use your distro's package manager to install software, you can also use it to update and remove it. This is one of the main strengths of Linux.

3. Thou shalt be a part of the community.
Freely give what you have received for free. Offer help and advice whenever you can.

4. Thou shalt read documentation and man pages.
Always read the documentation. The people who wrote the software tried to anticipate your questions, and provided answers before you asked.

5. Thou shalt use the available support system.
Switching to Linux can be tough. It can be frustrating, but there are a lot of people out there who want to help you. Let them.

6. Thou shalt search.
In most cases, your question or problem has already been addressed. Try to find the answers that are already out there before asking someone to provide a new one.

7. Thou shalt explore.
Linux opens a whole new world of options and possibilities. Try everything you can.

8. Thou shalt use the command line.
Especially when it comes to configuration, use the GUI tools to get your system working, but get to know the command line versions as well. In many cases, the command line is the only way to use some of the more advanced features.

9. Thou shalt not try to recreate Windows.
Linux is not meant to be a clone of Windows. It's different. Embrace and appreciate the differences.

10. Thou shalt not give up.
I tried several distributions before I found one I liked. I still try other distros from time to time. I also tried several different programs to serve one purpose before settling on what I use now (amarok, xmms, beep, exaile for music - azureus, ktorrent, deluge for bittorrents). If you don't like the defaults, remember that you can change almost everything to suit you.

Now that we have that out of the way lets talk about the Commandments themselves:

1. Thou shalt not log in as root.

This doesn't mean you shouldn't log in as root at all. It simply means you should use your normal user account for everyday tasks and use root only when required. There are times you have to use root account (for Raspbian and most Linux systems: sudo -i gets you to root access without having to re-log), e.g. for troubleshooting an installation, but once it's done you log out immediately. The issue is that if a root account is compromised or you make a mistake as root it can have a huge impact on the system stability.

Let's take an example: say you are trying to delete all files in your home directory with the following command: rm -rf ~/*. Because you were tired or didn't pay attention to the screen output, you entered the following instead: rm -rf ~ /* (Notice the space between the ~ and the /). Now, if you are logged in as a normal user you will get a bunch of permission denied messages and you are fine. BUT. If you are logged in as root, you will delete every single file in the / directory (which is the "top directory" on the disk and hence contains all the files on your system). With one Enter hit you have vanished your system away. You will have to restore it from backups (if you do backups, don't you?) or re-install, which will take precious time.

Think that wouldn't ever happen? It does. More times than you could imagine. You think this just happens on Linux? Sorry, wrong again! I have personal experience with such a thing on Windows (it was Windows 3.1 in the old times) and at that time I was just learning how to use computers. I'd installed a bunch of fonts (how cool they were!) thinking I was installing a fonts management program. When I realized that the few 100 MB worth of stuff I installed on my system didn't give me any new programs, I was upset. So, I've decided to delete the fonts from my system. Unfortunately, the command I entered was: deltree c:\Windows. This command, as you might imagine, deleted my entire Windows folder and I've spent a week reinstalling. This wouldn't have happened if I was using Linux or if DOS/Windows had any concept of multiuser access controls. They have gotten a lot better at it and XP/Vista/7/8 is a whole lot more secure than the older versions.

2. Thou shalt use the package manager when possible.

Usually a good idea, unless you have a specific reason for not using it. Think of the package manager as the Add/Remove Programs equivalent in the Linux world. Only it's a lot more powerful and versatile. Basically, it makes managing the system/installing new software a lot easier. All you have to do is to select a program you want to install (using the GUI frontend or the command line [apt-get, aptitude, synaptic, yast"¦]) and it does the work for you. The same goes for removing programs. Adding a program manually (by compiling it) confuses the system as the package manager doesn't know it's there so if it's needed for some other program, it will just download and install the latest version which might not be compatible with the version you installed.

Compiling programs and installing them is usually only required for users with specific needs or for software that doesn't exist in the package manager repository.

3. Thou shalt be a part of the community.

An important part. This doesn't mean that we expect you to start handing in code patches and fixes. It just means you share your experiences and if someone asks a question you can answer, you reply. You can be a part of the community by reporting bugs, creating documentation, help organize a meeting or create a new logo or layout that's more efficient. Proofreading the guides and reporting the issues you found while following it is also helpful. Feedback from a new user is an important step in software development and is appreciated.

4. Thou shalt read documentation and man pages.

Also important, but it doesn't mean that if you have read it and still don't understand it, you can't ask questions. It just means that if you want to know what a command does, you google it (e.g. 'how to delete files on linux'), search man-pages (on your system, e.g. man rm)before asking questions. It's an important rule, as it saves both your developers time. The time it took you to ask someone and wait for a reply, you could have assigned for searching the answer on your own.

5. Thou shalt use the available support system.

I don't really agree with this one, as sometimes the hardest part is finding the support system. I face this problem when I try to fix issues on Windows systems. Just recently I had problems with drivers for my laptop. If I hit an issue, I sometimes have a hard time because I don't know the right forums/news groups to ask questions in, or sufficient search term to google for.

6. Thou shalt search.

See Point 4.

7. Thou shalt explore.

This is true both for Windows and Linux. Don't be scared of your computer, it's not an evil machine plotting to make your life miserable. It's a tool, the same as your mobile phone, car, alarm clock, shoes. When you buy a new car don't you want to explore all it's features? The same is with a computer.

My friend just bought a new computer for and the first thing I told him was "don't be afraid to experiment; whatever you break in the software, can be fixed." (So can the hardware. But that might cost some money.) I've learned more by breaking the systems down and then trying to fix them, than by just playing. If in doubt, always ask.

8. Thou shalt use the command line.

I would rephrase this as Thou shalt learn to use the command line. If you want to (and are interested in), you can save a lot of time by entering a command instead of clicking through 10 dialog boxes.

9. Thou shalt not try to recreate Windows.

Good one. Linux is a different system. Think of it like a new language. When you learn Spanish, would you try to enforce your mother tongue vocabulary rules in it? Not really"¦ So why do the same with Linux? You can recreate the Windows layout, etc., but don't expect it to behave exactly like Windows.

10. Thou shalt not give up.

Very important rule. For everything in life, as well as computers. If you give up, you will never know what you are missing. You are more than welcome to try and decide what is and what isn't for you, but don't start installing and then quit the minute you hit the first obstruction.

Finally, a new addition from me:

11. Thou are more than welcome to use whatever OS that suites your needs

The main idea is to get the computer to work for you. If you are happy with Windows and it works for you well, then you are more than welcome to continue using it. After all, it's all a matter of choice. I won't force you to follow mine and I expect the same from you.

  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket

Contact