Advice for Linux Newbies |
|
|
I started from scratch with Linux with no previous computer experience. It took me months to realise certain truths, as the books on Linux were either very advanced, or very basic, explaining intuitive settings at length. I run OpenSUSE distribution, as it is supplied with many applications for almost any task, and I simply have to search in the graphical installer and package manager, YAST. When you install Linux, you create a user (yourself, for normal operations) and root, the administrator. You will normally log in as user, and enter the root password when installing software, editing files, or running certain commands. The Terminal Window and the Command Line As scary as this was at first, I am now friends with the command line. On your KDE panel there is an icon for a little computer screen - this launches a terminal window. It will open with a command prompt, eg. jane@Penguin:~>. While you remain as user, you can mess things up but not break them – acting unwisely as root, you can break your system completely. (OpenSUSE offers a chance to reboot in a safe mode.) If you are root (just type su <enter> and you will be prompted for the root password) it will be followed by a different sign, eg. Penguin:/home/jane # It will show which directory you are in - the little squiggle ~ (called tilde) always means home directory. See my commands page for a full list, plus examples of their usage. The command line is case sensitive, and most entries on the line must be separated by spaces. Once you have typed the whole entry on the line, press enter. To find things quickly use the locate command - it works from a database and can find any word in a filename quickly, listing all the files where that word appears. The database can be updated after changes to your system by typing updatedb, as root. (These days it is not installed by default on opensuse, so install the package called findutils-locate). To view the contents of files, use the cat command. To edit them, change to root and use an editor like mcedit. If you are anticipating a lot of lines in your output, 'pipe' the command to less, (the vertical bar, or two vertical dashes) eg cat <filename> | less (substitute the proper filename and remove the angle brackets) then you can read it from the top. After entering a command, it may stay blank or give feedback, and it will be finished when the prompt returns. The Directory Structure and Where Things Are Linux has a different directory structure to Windoze - you will not find a C and D drive. All your programs are spread out over a various directories, depending on the type of files. Each directory contains a certain category of file. In a terminal, type cd / and enter. and you will be in the root directory. Type ls, you can see all the main directories. The most important ones are: /etc
- contains a lot of config files. You may need to edit some of these
at some stage. To navigate between directories using the command cd, if you are typing the whole path from root, called the absolute path, start with a slash in front. If you just want to move into a subdirectory from where you are now, the relative path, don't use a slash. Installing New Software: RPM and tgz There are different types of software, or program files. Opensuse, Mandriva and Fedora use the rpm system, as opposed to Ubuntu, which uses deb. These are not interchangeable, so always read the complete filename carefully if downloading from the internet, to ensure that it is built for your system, such as 64 bit. Also, an rpm should be built for your exact distribution - one for another distro might work, but there is no guarantee. Software is normally installed with the graphical package manager, such as YAST, or by clicking on the file, when you will be asked for the root password. This is what makes it more secure than Windows – nothing can install itself without your permission. If a program you are installing requires another program to make it work, YAST will automatically select what is needed and install at the same time – but it will tell you first. Another type of software file, a more old-fashioned version, is the tar-gz. The advantage is that it does not have to be built for your particular system, but is more fiddly to install, requiring installation via the terminal window.
Installing rpm's If you are doing it by the terminal, first change into the directory where your downloaded program is. Next, su to root. Then type (for a new program) rpm -ivh <appname>.i386.rpm or to upgrade one previously installed rpm -Uvh <appname>.i386.rpm. Multiple files can be installed at once - use a wildcard (an asterisk) but keep a common denominator in the filename, eg rpm -ivh kde*rpm will install everything that starts with kde in the available files to be installed, eg on a cd. Sometimes things won't install - they complain about dependency problems (needing programs that it uses to be upgraded as well) or missing libraries. Unless I can figure out that I can find and install the missing stuff quite quickly, I just start searching for another app to do the same job... Your new program can be started from the menu – openSUSE will add it automaticallly when using YAST – or you can launch it from a terminal by just typing the name of the app, eg. just type opera. It probably won't add itself to the desktop like Windoze does, so right-click on the desktop and add a launcher that way. Suse will add it to its menu. When you add your app to the desktop, you will often have to look for the correct icon. Type rpm -ql <packagename> and in the file list it gives you, look for where the .png or .xpm files are. Right click on the icon and select Properties, then click on the icon box. It will open with a selction, but choose Other icons then Browse - and you can type in the directory where they are, and select the one you want. Tar.gz
files Permissions
They can also be from
a glitch in a program, eg. I installed the latest version of
striata reader, a command line application to read my bank
statements. It would not operate for me as user, only when I changed
to root, giving an error message that it could not create a temporary
directory. I changed into (cd) the /tmp/striata-reader directory,
checked the permissions with the command ls -al (list, showing all,
with a long listing) which showed a . dot indicating the current
directory, and found it did not have write permissions for all. As
root, I changed the permissions with the command chmod to give write
permissions to all. Editing Files with mc: First su to root, open mc, highlight the file to edit and use key F4 to open it in the editor. To edit a file directly from the command line, type <filename>, edit, then F2 to save and F10 to quit. Or in mcedit with a filename highlighted, press F4 and it opens the file in the editor. Help! When disaster strikes, how to get help? Google! Search using your error message, and you invariably find someone had the same problem. And the best way? Join a mailing list of a Linux User Group - search for one in your area, such as mine – the East Rand Linux User's Group. Good luck and have fun!
Jane Trembath, Benoni, South Africa. Updated January 2010
|
Other Extras: ------------------------------- Independent Cycle Touring in France -------------------------------- Self-Catering Accommodation, Wilderness -------------------------------- --------------------------------- Contact Jane here for more information.
|
|
© Jane Trembath 2010. All rights reserved. / Sitemap |
|