Sign in with
Sign up | Sign in
Your question
Closed

Linux Getting Started and Basic Troubleshooting Guide v1.10

Last response: in Linux/Free BSD
Share
a b 5 Linux
November 19, 2011 9:46:31 AM

Introduction

So, you've ventured into the strange world of Linux, leaving behind Windows/Mac OS X. Linux can be a difficult learning experience for the uninitiated. We have included some advice from the top Linux forum experts for success in Linux.

Linux unfortunately is not always as simple as install and go. Normally the OS will be operational after the first initial installation but you may notice some limitations or problems. This guide aims to address the common problems associated with Linux. It is important to understand that Linux is not Windows. There are fundemential differences between Windows/Mac OS X and Linux but that is not to say that there is absolutely no overlap. Using Linux means diving into the world of the command line. The command line is not scary. In fact both Mac OS X and Windows have their own command lines, but they are less apparent in the normal operation of the operating system.

Learning commands improves your knowledge of both the underpinnings of Mac OS X and Windows. Many concepts and commands such as sudo are cross-compatible with Mac OS X, as Mac OS X has its roots in Free BSD, a close descendant of Linux. Do not worry if you do not understand all of the commands to begin with. That comes with practice and patience. Many of the mainstream Linux distributions are relatively graphical, so you can get a good feel for Linux before you take a plunge into the deep end.

Google is your best friend here. If you have an issue, chances are, you're not the only one! Also, most distributions come with a user manual. Please refer to these resources before posting a question to Tom's Hardware.

When you have a problem that you are absolutely sure cannot be solved by Google, please ask! Although we want to help each and every single one of you users out there, it can't be done. We really don't want to answer the same few questions again and again so we have more time to answer the really big unique questions this guide doesn't cover. When posting a question, be sure to include as much data as you can obtain about the nature of the problem, how it happened and your hardware configuration.

Index
Common Linux Issues
Linux Power Optimisation Guide
Linux Glossary
Helpful Linux Links

This thread has been marked for improvement by amdfangirl. Suggestions and comments are appreciated. Contributors will be noted.

If you wish to contribute something to the Linux/Free BSD stickies please contribute here:

http://www.tomshardware.com/forum/237918-50-linux-contr...

Contributors: bmouring, Pyroflea, amdfangirl
a b 5 Linux
November 19, 2011 9:49:21 AM

Common Linux Issues

Google is your best friend here. If you have an issue, chances are, you're not the only one! Also, most distributions come with a user manual. Please refer to these resources before posting a question to Tom's Hardware.

Linux is through with explanations on why something works. If you understand what Linux is telling you, you can more easily fix the problem. Most of the time, Linux provides the answer for you and tells you why. It doesn't always pop up a new window to tell you. Running the program via the terminal will pop up the program and also any helpful warnings errors encountered will be displayed in the terminal window. Many programs will have what is called a logfile. Logfiles document record what actions a programme took.

System-wide programmes tend to put logs in /var/log, user programs tend to keep logs in your home folder, /home/$USER, however usually it's either a file or a folder that's prefixed with a '.', making it hidden unless you specify that hidden files are shown.

When Faced with a Hardware Issue, Make Sure the Kernel Sees/Knows the Hardware
With device plugged in, first things first" issue a ls$BUS_OF_DEVICE (e.g. lspci for PCI and PCIe, PCI-X, PCMCIA, etc. etc.). Take note that it shows up. Also handy, check the kernel logs that it shows up and has reasonable information about device config/bringup as well (easy method: from terminal, issue dmesg|less to get the kernel log into the less text pager, you can then use / to search for something in particular, by default it's case sensitive)

a. My wireless won't work!

1. Update your Linux, make sure you get the newest updates for it.

2. See if any restricted drivers are available. Ubuntu and Linux Mint tend to offer them to you. Install them and see what happens. Restricted drivers on Fedora must be manually installed

3. Identify what wireless card you have. Open terminal and type in

  1. lspci


4. For Fedora, attempt to find which package you need from: http://rpmfusion.org/ Detailed instructions on how to install the package are avalible on the rpm fusion website.

Open source wireless documentation for your wireless card can be found here:

http://linuxwireless.org/

5. Attempt to install the Windows wireless driver with NDISwrapper:

http://sourceforge.net/projects/ndiswrapper/

If you are using Ubuntu or Linux Mint, NDISwrapper should already be installed. A guide on how to use NDISwrapper is show here:

https://help.ubuntu.com/community/WifiDocs/Driver/Ndisw...

The NDISwrapper wiki is located here:

http://sourceforge.net/apps/mediawiki/ndiswrapper/index...

6. See if the wireless device is supported by other Linux distributions. Sometimes a more cutting edge distribution such as Fedora will have already have had the latest open source driver installed.

b. My Ethernet/LAN doesn't work!

Follow the same instructions as question a, but omit NDISwrapper, it doesn't work for wired connections.

c. Will Linux work on my computer? Is my hardware supported?

1. If you are using an Intel Macintosh, chances are since your hardware configuration is so common, it will be supported.

However, if not, search the internet for your motherboard and graphics card to see if

2. Test it for yourself! As a general rule, if something doesn't work in LiveCD mode, it won't work out of the box when you install it.

3. If it still refuses to work, you should try a text based installer. They are marked "alternate" installation CDs.

4. See if the hardware is supported by other Linux distributions. Sometimes a more cutting edge distribution such as Fedora will have already have had the latest open source driver installed.

d. Will my Windows software work in Linux?

1. Native Linux applications are normally your best options. Native applications work better and are more stable.

A recommended list can be found here:

http://www.tomshardware.com/forum/237916-50-consolidate...

2. WINE can be used to run Windows software, please be aware it does not work with all software.

A guide is available here:

http://www.tomshardware.com/forum/237916-50-consolidate...
a b 5 Linux
November 19, 2011 9:49:37 AM

Linux power optimisation
This guide is designed to assist and aid inexperienced Linux users to increase battery life in response to the common complaint of lower battery life in Linux.
Be warned that in many instances, the power saving advice may reduce the overall performance of your laptop, a trade-off some deem worthy for added battery life.

If you do not understand what you are doing, please ask! Tweaking without knowing is a bad idea!

Tweaks were performed on a Lenovo s10e with Fedora 15. Tweaks may not apply to all distributions.

Inbuilt Power Saving Programmes
Many Linux distributions contain methods of conserving power, such as lowering the screen brightness or making the disk idle when not in-use. These are distribution specific, so rather than listing all of them, you will probably find them in your system settings. These should be your first port-of-call.

Power Management Tweaks
Depending on your distribution, there may be guides already set up for your distribution of Linux. For example Fedora maintains a list of common tweaks to lower power consumption.
It is best to refer to each individual distribution's guides if they already exist. However, many of the tweaks mentioned below should work for any distribution.

Fedora - Simple tips to reduce power usage
Quote:

Use a properly dimensioned system for the job (no need for overpowered systems for simple Desktop use e.g.)
For servers consolidate services on fewer systems to maximise efficiency of each system
Enforce turning of systems that are not used (e.g. company policy)
Unplug and/or turn of peripherals that aren't used (e.g. external USB devices, monitors, printers, scanners)
Turn of unused hardware already in BIOS.
Disable power hungry features.
Enable CPU scaling if supported for ondemand CPU governor. DONT use powersave governor, typically uses more power than ondemand (race to idle).
Put network card to 100 mbit/10 mbit:
10 mbit: ethtool -s eth0 advertise 0x002
100 mbit: ethtool -s eth0 advertise 0x008
Doesn't work for every card
Put harddisk to spindown fast and full power saving:
hdparm -S240 /dev/sda (20m idle to spindown)
hdparm -B1 /dev/sda (Max powersave mode)
Make sure writes to hd don't wake it up too quickly:
Set flushing to once every 5 minutes
echo "30000" > /proc/sys/vm/dirty_writeback_centisecs
Enable laptop mode
echo "5" > /proc/sys/vm/laptop_mode
Use relatime for your / partition
mount -o remount,relatime /
Disable CD-ROM polling from HAL (prevents popups when a CD is inserted):
hal-disable-polling --device /dev/scd0
Enable USB autosuspend by adding the following to the kernel boot commandline:
usbcore.autosuspend=5
Screensaver needs to dpms off the screen, not just make colors black. To turn of monitor after 120s when X is running:
xset dpms 0 0 120

Source: http://fedoraproject.org/wiki/Features/PowerManagement#...

Linux Power Regression
For users running the 2.6.38 kernel and beyond, a problem has arisen from the 2.6.38 kernel changes resulting in significantly higher power consumption.

For users of the 3.2 kernel there is a kernel patch available!



The power-saving feature known as 'pcie_aspm' has been disabled on computers whose BIOS reports it to be incompatible or suggests it to be turned off. 'pcie_aspm' is designed to power down unused PCI-E lanes.

An incomplete list of BIOSes that do not support this are avalible at: http://www.phoronix.com/scan.php?page=news_item&px=OTk4...

To determine whether 'pcie_aspm' is enabled or not, navigate to this location with your file manager.

/sys/module/pcie_aspm/parameters

There should be a file named 'policy'.

If the file says
  1. default performance [powersave]

'pcie_aspm' is enabled.

To force 'pcie_aspm' to function, please add the following to the boot command line in GRUB:

  1. pcie_aspm=force


Please be warned that this may affect the stability of your system and cause freezes. Please back up data before attempting.

Use either of these commands to summon GRUB config.

  1. su
  2. gedit /etc/grub.conf


or

  1. sudo gedit /etc/grub.conf


Reference Phoronix article: http://www.phoronix.com/scan.php?page=article&item=linu...

Installable Programmes
Powertop: http://www.lesswatts.org/projects/powertop/
Powertop is a Linux power monitoring programme designed to reduce the power consumption of laptops by offering power consumption optimisation advice. This is an invaluable tool for beginner and experienced Linux users alike.

You can easily install this programme in Ubuntu, Linux Mint, Fedora and other various distributions.

Powertop is often included with the mainstream distributions.

Ubuntu, Mint and derivatives
  1. sudo apt-get install powertop

Fedora, Mandriva and derivatives
  1. yum install powertop


Powertop, regardless of the distributions is launched from terminal.
  1. su
  2. sudo powertop


You should be presented with a screen similar to this:


Use the arrow keys to navigate the interface.

A list of suggestions can be found as seen here.


You may find a brief guide on how to interpret these suggestions at: http://docs.fedoraproject.org/en-US/Fedora/14/html/Powe...

cpufrequtils:
For the more advanced and adventurous, cpufrequtils is a programme which allows the throttling of CPUs to reduce power consumption. Obviously lowering the clock speed will also lower the performance of the system. A well written guide by the Arch Linux team is available.

Guide: https://wiki.archlinux.org/index.php/CPU_Frequency_Scal...

This sticky has been marked for improvement by amdfangirl. Suggestions and comments are appreciated. Contributors will be noted.
Related resources
a b 5 Linux
November 19, 2011 9:49:57 AM

Useful Linux terms:
APT - The package manager for Ubuntu, Linux Mint and Ubuntu based Linux.
.DEB - File format designed for Debian based software
Distro or Distribution - A special flavour of Linux, designed to cater to a particular audience.
Terminal - A command-line interface method for controlling a Unix-like operating system
.RPM - RPM Pacakage Manger, an executable file format that installs software, often used with yum (fedora), urmpi (mandriva) and etc.
OS or Operating System - A software that manages computer hardware resources. Examples include: Unix, FreeBSD, Windows, Mac OS X, Linux.
VM or Virtual Machine - An application which imitates a seperate computer so another guest operating system can reside in host operating system. Similar to an emulator.
YUM - The package manager for Fedora and Red-hat Linux.
WINE - Wine is not an emulator - A library of data designed to run Windows applications natively on Linux without copying Windows.
a b 5 Linux
November 19, 2011 10:04:05 AM

Useful Links
Distrowatch Distrowatch is a linux website dedicated to documenting all the various Linux distributions.
Linux Home Networking A Linux website dedicated to helping you with Linux server duties and basics of Linux
Linux Reviews A good website about everything Linux - has good guides on how to use Linux.
a b 5 Linux
February 5, 2012 3:25:44 AM

This topic has been desticky in top of the forum by Amdfangirl
!