Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Absolute Beginner Talk
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.
Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Absolute Beginner Talk
The perfect starting place to find out more about computers, Linux and Ubuntu.

 
Thread Tools Display Modes
Old March 11th, 2006   #1
Pragmatist
Fresh Brewed Ubuntu
 
Pragmatist's Avatar
 
Join Date: Feb 2006
Beans: 1,364
Ubuntu 7.04 Feisty Fawn
How to Help Yourself

I thought it might be nice if we all contribute some tips on common ways to solve problems. If there is a similar thread please let me know and perhaps we can merge them or at least reference it. Also, I will make another post in this thread containing a list of all the commands, configuration files, and all of the URLs. Finally, I strongly encourage others to contribute their ideas and I will add more ideas if they occur to me. Perhaps if there is enough demand, we can make a wiki (again if doesn't exist already)

1. Search this forum (not just the beginner section)
2. https://wiki.ubuntu.com/ The first stop for Howtos.
2.a.http://doc.gwos.org/index.php/Main_Page This looks fantastic! Thanks matthew!!
2.b.http://help.ubuntu.com "The main Ubuntu documentation website" Thanks mattheweast!

3. http://tldp.org/ more Howtos and tutorials and even book-length works.

4. www.google.com/linux One of the best all-purpose tools. Often I'll type in parts of error messages and find anothers solution very quickly; or I'll get ideas for further research. Also I frequently can help someone else by finding drivers or even solving their problems by getting information they didn't have; and learn something in the process.

4a. http://sourceforge.net and http://freshmeat.net These sites are great for finding more Open Source Software. Sometimes you can find some project here that will solve an unusual problem.

4b. The software manufacturer's website: Use the website's search feature, look for documentation, and look for mailing list archives.

5. synaptic: Search the repositories of nearly 18,000 packages to find the best tool for the job. If one isn't working, maybe you can find another of a similar type. There is a search function in synaptic that makes it easy to find packages.

6. man pages. These are on your system and are essential reading. The information is terse, but it is another good starting point. If your looking for man pages related to a topic try this: man -k keyword This will give you a list of man pages with brief descriptions. The command name and description is searched. I use this all the time.

7. locate: Of course you can use the find command, but this is much easier to use and you don't need to learn the special language of regular expressions. You do need to update the database that locate uses. You do this with the updatedb command:
Code:
sudo updatedb
If you install software and need to search the new files, you run this first. Note: this can take a little time, so don't worry if your terminal doesn't respond. You can run this in the background with
Code:
sudo updatedb &
or just make another tab in your terminal (if you use gnome-terminal) with CTRL-SHIFT-T When it is done you just type:
Code:
locate keyword
You don't have to know the whole filename. If your looking for files related to java, for instance, just type:
Code:
locate java
8. grep, cat, and pipes: Often, when troubleshooting, you want information from dmesg or /var/log/messages or other files that have lots of information in them. If I wanted to see information in dmesg related to USB, for instance I could type:
Code:
dmesg | grep usb
The vertical bar is called a pipe and what it does is take the output of the command on the left (dmesg here) and send it as input to the command on the right (grep) This is one of the beauties of Linux. Many of the command line tools can be used in this way. So if I want to find descriptions of important configuration files related to CUPS I can type:
Code:
man -k cups | grep config
You can have even more pipes in one command if you want. cat just outputs the information in a file and is often used with a pipe:
Code:
cat /var/log/messages | grep usb
Will give you all the lines in /var/log/messages (a very long file) that contain the word usb in it.

9. The /etc directory and hidden configuration files: The /etc directory contains very important, global, configuration files. It has many subdirectories relating to specific software. For instance, if your trying to configure the Gnome Display Manager (gdm) you'll find it in /etc/gdm. Some other important files in the etc directory include /etc/profile which has some system-wide defaults and /etc/inittab which controls aspects of how your computer starts (especially its default runlevel). Hidden files are files that start with a period. They can be seen by using the -a switch to the ls command. type this in your home directory:
Code:
ls -a
and you'll see lots of files and directories that begin with a period. These are your user configuration files and are very useful when configuring programs. You can find things like your bookmarks file within the your browsers' configuration directory.

10. Processes: I use the ps command all the time. The most common usage is ps -ef Again, this can be used with grep to narrow what your looking for. Say your troubleshooting power management and you know ACPI has something to do with that. You can type:
Code:
ps -ef | grep acpi
top is a more sophisticated and powerful tool for working with processes.

11. Hardware information:

(a) dmesg used with grep will give you important messages related to the hardware problems you are experiencing.

(b)/var/log/messages has important information. When testing a device you can do this:
Code:
tail -f /var/log/messages
This uses the tail command which, by default, gives you the last 10 lines of a file. The -f means "follow" which just keeps scrolling the last 10 lines of that file. Then you plug your device in and watch the terminal for the new entries to /var/log/messages (they are appended to the file, so by seeing the last 10 lines you can see the latest changes)

(c) /etc/fstab and mount:
Code:
cat /etc/fstab
is essential when troubleshooting devices. The man page and howtos found through the URLs given here will explain what the entries mean and how to make them. Typing mount by itself will tell you what devices are currently mounted on your system, along with other useful information.

(d) lsmod and modprobe lsmod lists the modules that are currently loaded on your system. A driver typically takes the form of a module. A module is a way to add something to the kernel (the Linux OS). When a kernel is compiled it has the most relevant options included. Options that aren't used often, or are specific to less common hardware, are included in the kernel as modules that must be loaded. modprobe adds or removes modules depending on circumstances. Often you will be adding a driver module, but sometimes you also have to remove conflicting modules.

(e) lshal hal-device-manager: HAL stands for Hardware Abstraction Layer. According to this site: http://www.ometer.com/hardware.html referred by the HAL website: http://www.freedesktop.org/wiki/Software/hal The purpose of HAL is to provide
Quote:
a nice, user-friendly interface to the hardware of a typical desktop system.
lshal lists all of the devices that IT knows about on your system (hint: use grep to find your device as this list is usually long) hal-device-manager is a GUI-based way to see your devices and can be more pleasant to use than lshal

(f) udev "How come my device file keeps changing. First it was /dev/sda1 now it is /dev/sdb1 Why is this happening to me??" udev is relatively new and its function is to dynamically create devices. In the olden days, the /dev directory was huge. Now it just contains relevant files. However, what this means is that when you plug in a device today it is given one device filename. When you plug it in tommorow it might get a different device filename. Read the man pages related to udev (man -k udev). There you can learn about writing simple udev rules that will, among other things, allow your device filenames to be the same every time.

12. Software installation issues:

(a) If your compiling software that isn't in a repository, it will typically be a .tar.gz file or .tgz file or .tar.bz2 or something similar. After you download move it to a standard installation location such as /usr/local or your home directory. I often use /usr/local however you need to use the sudo command to move files and run commands there:
Code:
tar xvzf filename.tar.gz
Note if this is a .tar.bz2 you use a j instead of the z in the previous command (tar xvjf). Then go into the new directory that is created and read the README and INSTALL files. Typically you will then do this inside the newly created directory
Code:
./configure
Code:
make
Code:
sudo make install
Important: Compiling software requires certain tools, i.e. programs. For instance, among other things, you need the "make" program and a compiler like "gcc". In Ubuntu, the simplest way to ensure you've got these is to install the build-essential package. Thanks nanotube for this suggestion!

If you get warnings, don't worry about them. If you get errors you'll need to find out why. Usually the first line of the error is most important. If your missing some library or need to update a library, often that isn't that hard to fix. You can use the repositories (look in synaptic) or, if it isn't there, you can track it down with www.google.com/linux

(b) Update your system regularly. Not only will this prevent software problems such as dependency issues during software installation it will also improve the operation of your software, eliminate bugs, improve the security and overall operation of your system substantially. Type this:
Code:
sudo apt-get update
and then
Code:
sudo apt-get upgrade
(c) Try running the program using sudo just to determine if your problem is related to file permissions (definitely seek out a howto about file permissions)

Last edited by Pragmatist; May 3rd, 2006 at 02:18 PM..
Pragmatist is offline   Reply With Quote
Old March 11th, 2006   #2
cvcaelen
5 Cups of Ubuntu
 
cvcaelen's Avatar
 
Join Date: Dec 2005
Location: Merelbeke, Belgium
Beans: 30
Ubuntu 6.06
Re: How to Help Yourself

Usefull info in here

learned new things

Thanks

Christiaan
__________________
registered Linux user number 406437
cvcaelen is offline   Reply With Quote
Old March 11th, 2006   #3
Klejs
Just Give Me the Beans!
 
Join Date: Mar 2006
Location: Växjö, Sweden
Beans: 56
Send a message via ICQ to Klejs
Re: How to Help Yourself

Thanks alot for this one, learned a few new things on the way too...
__________________
Klejs - GNU/Linux is all you need
Registered Linux user #: 412925
Registered Linux machine #: 320008
Klejs is offline   Reply With Quote
Old March 11th, 2006   #4
chuckyp
Quad Shot of Ubuntu
 
Join Date: Mar 2006
Location: Somewhere Ohio
Beans: 399
Gutsy Gibbon Testing
Send a message via AIM to chuckyp
Re: How to Help Yourself

You may want to correct the tips.

sudo apt-get update (Fetches a list of packages currently availibe up to date)

Then

sudo apt-get upgrade (To upgrade any packages that you have currently installed.)

I dunno let me know if i'm wrong i'm extremely tired.
chuckyp is offline   Reply With Quote
Old March 11th, 2006   #5
Iowan
Ubuntu addict and loving it
 
Iowan's Avatar
 
Join Date: Jan 2006
Location: Not heaven... Iowa
Beans: 6,300
Ubuntu 8.04 Hardy Heron
Re: How to Help Yourself

Here's another good one:http://www.howtoforge.com/
Iowan is offline   Reply With Quote
Old March 11th, 2006   #6
Pragmatist
Fresh Brewed Ubuntu
 
Pragmatist's Avatar
 
Join Date: Feb 2006
Beans: 1,364
Ubuntu 7.04 Feisty Fawn
Re: How to Help Yourself

Quote:
You may want to correct the tips.

sudo apt-get update (Fetches a list of packages currently availibe up to date)

Then

sudo apt-get upgrade (To upgrade any packages that you have currently installed.)
Thanks for the correction. I'll make the change right now in the Original Post.
Pragmatist is offline   Reply With Quote
Old March 11th, 2006   #7
matthew
Bubbleheaded Star Child
 
matthew's Avatar
 
Join Date: Apr 2005
Location: Parts Unknown
Beans: 8,766
Ubuntu 9.04 Jaunty Jackalope
Re: How to Help Yourself

Hey, Pragmatist!

Great post, man!! Thanks for helping the community! You get a link in my sig for sure. I would also like to suggest adding the Ubuntu Document Storage Facility to the list.
__________________
Forum FAQ | Forum CoC | what's a troll? | are you imposing?
my blog | my writing

Don't ask support questions in PMs--post a thread so everyone can benefit!



Last edited by matthew; March 11th, 2006 at 02:14 PM..
matthew is offline   Reply With Quote
Old March 11th, 2006   #8
Pragmatist
Fresh Brewed Ubuntu
 
Pragmatist's Avatar
 
Join Date: Feb 2006
Beans: 1,364
Ubuntu 7.04 Feisty Fawn
Re: How to Help Yourself

URLs:
https://wiki.ubuntu.com/
http://tldp.org/
www.google.com/linux
http://sourceforge.net
http://freshmeat.net
http://www.howtoforge.com/
http://doc.gwos.org/index.php/Main_Page

FILES:
/var/log/messages
/etc
/etc/profile
/etc/inittab
/etc/fstab
/dev
/usr/local
README (in newly uncompressed tarball directory)
INSTALL (in newly uncompressed tarball directory)

COMMANDS:
man
man -k
updatedb
locate
sudo
grep
cat
dmesg
ls -a
ps
ps -ef
tail
tail -f
lsmod
modprobe
lshal
hal-device-manager
tar
apt-get update
apt-get upgrade

Last edited by Pragmatist; March 12th, 2006 at 03:33 PM..
Pragmatist is offline   Reply With Quote
Old March 11th, 2006   #9
noswal
Just Give Me the Beans!
 
noswal's Avatar
 
Join Date: Feb 2006
Location: Stranded, on Earth
Beans: 71
Ubuntu 8.04 Hardy Heron
Re: How to Help Yourself

Use this link before installing ubuntu, ideally have a second computer running.

http://users.bigpond.net.au/hermanzone/p14.htm
__________________
______________________________________________
Life: good in places but no substitute for the real thing.
noswal is offline   Reply With Quote
Old March 11th, 2006   #10
kittycatsexycat
Just Give Me the Beans!
 
kittycatsexycat's Avatar
 
Join Date: Mar 2006
Location: Isle Of Man
Beans: 50
Ubuntu Breezy 5.10
Re: How to Help Yourself

I'm not very good at the whole linux thing and have just changed back to breezy after trying dapper... Thanks for your tips...
kittycatsexycat is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:10 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry