LinuxIntro

From LQWiki
Jump to: navigation, search

This article is an introduction to Linux. If you are already familiar with Windows, you can read Windows to Linux Migration instead.

Getting Help

You learn a lot when reading and writing into forums like www.linuxquestions.org. You can also ask questions and give answers in a chat. For example, if you have a question regarding KDE, point your xchat to irc.kde.org, port 6667, channel #kde and start asking. If you have a question regarding Suse, just join channel #suse and so on. You may also benefit from the Linux Dictionary which contains explanations to words from the Linux world.

Guided lessons

As a beginner you might want to experience how to…

Choose a Linux Distribution

Main article: Choosing a Linux distribution

It is a good idea to start with a wide-spread distribution such as SUSE, Ubuntu, Linux Mint or Fedora, rather than a less widely used distribution. More people using a Linux distribution generally means more support and more active development. If you pick some "kewl" distribution that only a few hundred people use, then you're going to have a very hard time getting your questions answered and getting bugs patched. Mainstream desktop distributions tend to be easy to use out of the box, without requiring a computer science degree to install and configure.

Many Linux distributions (often called "distros") allow you to operate them fully from a live CD without having to install them. A live CD distribution loads and runs from memory and does not perform an installation unless you chose that option. This live CD gives you the opportunity to "test drive" a system before you make any commitment of time and energy to it.

You can find a complete listing of current distributions by searching List_of_Linux_distributions, which lists the various options alphabetically, by "family-tree" lineage and also some special characteristics. The list also includes outside links to pages where you can find summaries and reviews for each distribution.

Install Linux

Main article: Linux installation

Dual-boot is a hardware configuration that permits more than one operating system to be installed concurrently on your computer system. Linux can be installed for dual-boot so that you can choose between Linux and another operating system, even a different Linux distribution, when you start your computer. If you will be running Windows and Linux in a dual-boot configuration, it is generally recommended that you load the Windows operating system (OS) on the first drive booted by the machine's BIOS.

So if you are using a single hard drive that will be partitioned, you would want the Windows OS on the first partition. If you are going to be running two separate hard drives in the same machine, you would want the Windows OS to be on the Primary Master drive (position one) and your Linux OS to be installed on the Primary Slave drive (position two).

The Linux system will identify each IDE drive with the designation of "hd" ("sd" for SATA drives) with successive letters starting from "a", then each partition on the drive will be designated by a number so that your list of drives/partitions might read something like: "hda1 Windows System Files; hda2 Windows User Directories; hdb1 Ubuntu 10.04; hdb2 Ubuntu/home."

It is a good idea to make note of where you will be installing your Linux system and any other partitions that are to be installed as well. Also, disconnect any external devices you might have plugged into your computer, such as a flash drive, MP3 player, etc. This will keep you from accidentally over-writing files or data.

Alternatively, you can install Linux into a VMware virtual machine, or another virtual machine such as Virtualbox. In this case, you can have two or more operating systems running at the same time. The virtual machine installation is explained in more detail on the Virtualization page.

The most common method of installing Linux is to obtain a linux boot DVD or CD and basically follow the install procedure and screens. The prompts are given in a straightforward language that is not overly difficult to understand.

Open a console

Main article: Open a console

You need to open a console to issue commands to your Linux system. These commands will be interpreted by a program called a shell. A console is a window or session that presents you with a prompt line. A console normally presents a prompt line with the cursor resting at the first character past the prompt. This is where you issue your command. Any command results appear beneath your command line. When you open a console, you may be presented with a shell prompt typically displaying your computer's hostname (in this case tweedleburg):

tweedleburg:~ #

This means you may start typing commands.

There are several ways to open a console. Depending on your desktop environment, installed software and distribution, one or more of the following procedures might work for you:

  • There are six "virtual consoles." Entering Control-ALT-F1 will open "console 1", Control-ALT-F2 will open "console 2", with the final console opened with Control-ALT-F6. You may switch from any console to any other. Usually you are prompted to log into the Linux system at each console. Once you do, you remain logged on until you log out.
  • press ALT_F2, type "xterm", then ENTER. This works for most distributions.
  • press ALT_F2, type "konsole", then ENTER. konsole is very user-friendly. This will work if KDE is installed.

Now that you have opened a console, try ls as your first command. It must be entered in lower case as:

ls

and you get a listing of files in your directory, similar to this:

tweedleburg:~ # ls
a.out  dom  index.txt  main.cpp  structureparser.cpp  structureparser.h  structureparser.h.gch

Great - now you are ready to read and understand the article about installing software.

Install Software

Main article: Installing Software

As opposed to other operating systems, the easiest way to install software is not to download an installer from the web. Instead, you should use the system management tools from your distribution to do this. So, find out your distribution and install the software by its installation measures. For example, to install Firefox in SUSE Linux, you use

yast -i firefox

You can find a complete listing for all distributions at installing software.

Lessons in no particular order

Main article: HowTos

Tips

Main article: Tips

Tips are clever solutions to questions that may not even have come to your mind. Here are some examples:

Applications

Main article: Applications

Commands

Main article: commands

Hard drives

Main article: hard drive commands

  • hwinfo --storage-ctrl : discover your hard disk controller
  • hwinfo --block : discover what disks you have
  • hwinfo --partition : discover what partitions you have
  • fdisk : divide your disk devices into partitions     (USE WITH CAUTION!!)

NetWorking

Main article: Network commands

  • hwinfo --netcard :find out your NIC's type and abilities
  • ethtool : find out if a cable has been plugged in (link detection)
  • ping : find out if a computer is reachable
  • ifconfig : set your IP-address
  • route : set your default gateway
  • nmap : find out about ports information on a computer

See also