You broke something. Congratulations! You’re one of the millions of people across the globe, who have broken their system, perhaps without having any clue whatsoever about how you even did it...
Okay, so, you’ve tried some searches online, you’ve asked your other computer savvy friends, and you’ve also dug out your favourite hammer – just incase you need to break something. Being real though, there’s many times where you may need to seek out help online using forums, IRC, or mailing lists.
In these cases, simply asking, “I broke my ‘distronamehere’ install. Help?” won’t really do much for you. Now if you said, “I broke my nginx config, and checked the log files. I can’t seem to figure out exactly what the error is, so I’ve posted it here, if anyone can help: www.mypastebinlink.com/linkstuff,” you’d get much further.
So, here’s somethings you should know how to do, use, or find, when seeking online help. Obviously, there is going to be many things not covered here, because there’s more things that can break on a GNU/Linux system, than I care to count; but this should get you started so you at least look like you have some idea what you’re talking about.
/var/log/ -- Check the logs!
Now, there is going to be exceptions to this, but a pretty good rule of thumb, is that if you’re having issues with a process failing to start / restart, crashing, etc., to check /var/log/ for the respective log file you need. Many, many applications put their logs here, so I would say that first thing above all, is check the logs.
An easy way to check log files in real-time, is using the tail -f command, such as:
sudo tail -f /var/log/nginx/error.log
The tail command, will actively take over your terminal until you end the process (cntrl+c) and show you the contents of the file specified, as it happens. This is especially handy for things like Apache/Nginx, so you can watch the error log as you attempt to visit a page / do whatever, and the corresponding error.
A handy little tool called pastebinit will automatically send any terminal output you pipe into it, to pastebin for you. There are a number of ways you can customize your paste if you wish, using various options added into your command, however, at its core pastebinit is very simple to use.
Again, to use the same example as before, sending the contents of /var/log/nginx/error.log this time into a pastebin link:
tail /var/log/nginx/error.log | pastebinit
https://paste.ubuntu.com/p/XXXXXXXXXXX/ <---- you will receive an output that looks like this, with your pastebin link.
Note: pastebinit will automatically try to see if the distro you are using, has its own pastebin, and if it does / its known to pastebinit, it will use it. If not, it will default to pastebin.com.
Another way to use pastebinit, is to send the contents of a file, directly:
pastebinit -i myfile.conf
This one sounds a little redundant, but its unbelievably true...Know your system. If you’re using OpenSUSE, you need to specificy if you’re using Tumbleweed or Leap for example, or which release of Ubuntu you use. Knowing your kernel version is always handy as well:
or a more broad spectrum of kernel information
Or perhaps print all PCI device information, like usb ports, graphics adapters, etc:
lspci -v #remove the -v for a more simplified list
If there is one tip I can give to anyone about to go ask for support somewhere, it’s do as much research into the problem as you can, first. Even if you have no idea what the actual problem is, if you at least can say, ‘I tried X and Y to find the problem.’ then whomever it is who helps you, will have some idea of where you started, your capabilities / knowledge, and at the very least, will appreciate the effort.
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.