This has been one of my most difficult problems, when writing how-tos its exactly not to tempt the "idiot" gene... a Impossible task for anyone, this is because the more and better you try, nature comes up and makes a better "idiot".
So having said that you posted...
Code:
sudo apt-get dist-upgrade
Invariably upgrading a distro breaks something, this tempts the "idiot" gene a great deal, this command should come with a BIG disclaimer and or warning. This considering some % of users will have XBMC installed and alsa and lirc...IDK just my point of view.
Another thing is the command to run xbmc-live or stop xbmc-live
Code:
sudo start xbmc-live or sudo stop xbmc-live
also works. Because I run as root for admin/maintenace compile/install purposes basically because "
I hate entering sudo", sudo may be redundant on these idk. Honestly these dont work for me without sudo or being root. But everything works OK XBMC wise and as expected.
I have a few commands that I found invaluable and thought sharing would help your list... here's is what I rustled up in my insanity.
If having lm-sensors installed you need to configure it and get results...
This goes through the detections of supported sensors and drivers used on your system and file writes to file, requires some user input.
Displays the temperatures of all devices detected by sensors-detect
After any modification to sensors config file this enables new configuration. Can be run before or after the
sensors command...
Code:
sudo modprobe "driver"
This temporarily loads a driver or kernel module into current session for e.g. ic2-dev
Code:
echo "driver" >> /etc/modules
Inserts driver or kernel module so it is loaded after reboot automatically.
Code:
sudo dkms add -m driver-name-src -v 1.0.0-ubuntu
Add a drivers source and version into dkms tree (helpfull to have it build automatically after a kernel upgrade. 1 0f 3
Code:
sudo dkms build -m driver-name-src -v 1.0.0-ubuntu
Part of previous only this builds the driver source so it becomes ready to be installed. 2 of 3
Code:
sudo dkms install -m driver-name-src -v 1.0.0-ubuntu
Again part of previous this one actually installs driver and makes it immediately available. 3 of 3
Show info about all loaded drivers into current session.
Code:
sudo dpkg -i filename.deb
Installs a .deb file manually
Code:
sudo dpkg -i --force-overwrite filename.deb
Helpful when theres problematic .deb's which refused installing and may cause broken pipes failed configurations of packages preventing installation.
Code:
sudo dpkg --configure -a
Usually issued to finishing configuration of unconfigured packages (worth mentioning in conjunction with previous)
Code:
wget -n -q http://linktofile.com
Grabs a file with no visible output on terminal from any destination.
Code:
sudo chmod +x filename.extension
Makes a file executable though there is no need for a file extension for executable files in Linux (because Linux is great that way) usually executable files come in form of scripts e.g. filename.sh or .run packages though this is hardly a rule.
Code:
sudo ./filename.sh
sudo ./filename.run
sudo sh filename.sh
sudo sh filename.run
Runs or executes a script or .run package some scripts don't like being executed with either one or the other (usually errors out perhaps because of syntax), for this reason I found it worth mentioning this and both methods, even though script writers will let users know how to execute them.
Code:
sudo chown user:user /dir or filename
Changes owner of a directory from root:root to user:user to be used carefully, usually running this may cause failures if your modifying a
/dir or
filename ownership that shouldn't be modified. Dangerous command if you dont know what your doing, but helpful if you do know. This also tempts the "idiot" gene.
Code:
sudo chown user -R /dir
this changes ownership
recursively not only of a directory but everything inside that directory. Dangerous command if you don't know what your doing, but helpful if you do know. This also tempts the "idiot" gene.
lshw cat /proc/cpuinfo lspci lshw -class network cat /proc/ioports cat /proc/iomem cat /proc/interrupts
Those are old commands and their respective results useful in some cases I will expand on them when I can, I dug them out of a very old post when I was 1 month into learning about the wonders and curses of Linux running jaunty on my trusted and pain in the ass Asrock ION HT 330. Basically it was meant to compare how similar ION gen 1 systems are, because they were all built by
Pegatron a hardware manufacturer for the first year or two. Though to determine the similarity one had run and compare the results.
Heck the list goes on I think covering all useful commands in a thread could go on forever but I find this helpful for novices that actually are curious and want to learn about Linux. I think its a good idea even if not a new one.
Note: The use of "idiot" gene - not meant as offensive to anyone in particular but it accurately describes a widely known phenomenon. Usually associated with
PEBKAC no one is immune and no known cure exists.
Note: Some of the commands I posted are
dangerous indeed so when in doubt have a full system backup/image before any tinkering... This is probably the most valuable tip to prevent a massive waste of time and prevent full system reinstalls.
hope some of these commands help others same way they have helped me understand a little about Linux.
I still am a massive n00b at Linux but I try and never totally given up, persistence is key.
It only took me 4 hours to write this post...

and even after double triple checking I have this feeling something is missing... ah the joys of sleep deprivation.
cheers.