LinuxIntro

From LQWiki
Jump to navigation Jump to 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.

Books

The Linux Command Line

Tuxcademy

Linux Fundamentals

The Ultimate Linux Newbie Guide

Proprietary books on Amazon.com

How Linux Works: What Every Superuser Should Know by Brian Ward.

The Linux Command Line by William Shotts.

Make sure to choose up-to-date versions.

Forums

Linuxquestions.org is a great forum. You should provide some details about your distribution and hardware.

To know about your hardware use the following commands:

lshw
lspci

Please visit the following link.

To know what your distribution is:

cat /etc/os-release

or

lsb_release -a

The result.

Don't forget to read the rules before posting.

Before posting please search the forums and the search engines about your problem. Common problems such as multimedia codecs and Nvidia cards are adequately covered in the forums.

IRC Chat

On Linux

use one the these programs: Konversation, Quassel, KVIrc, XChat, HexChat, PidgIn.

If you don't have Internet connection on Linux or your system doesn't boot properly

You may use IRC chat applications on Windows to help you solve your Linux problem. Use Pidgin, Hexchat, mIRC or KVIrc.

IRC Channels

For Ubuntu: [1].

For Linux Mint: [2]

For Linux in general: [3]

How to join a channel

[4]

Documentation

Documentation for Ubuntu 18.04 [5]

Documentation for Debian Buster [6]

Man command: refer to the book "Introduction to Linux-A hands on guide" for more details. Section 2.3 is your target.

Info command

Using search engines

Google and duckduckgo are excellent sources for information. If you want to install KDE on Ubuntu 18.04 use the follong keywords

install KDE Ubuntu 18.04

YouTube

Prominent channels:

[7]

[8]

[9]

Please pay special attention to these videos:

[10]

[11]

[12]

[13]

[14]

[15]

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 widespread distribution such as 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.

Visit the following websites:

  • Librehunt: makes it easier for beginners as well as advanced users to have an easy method to use Linux. Answer some simple question to have a suggestion for the suitable distribution for you.
  • Distrotest.net: a website on which you will find many operating systems, which you can test directly online without a installation.

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

You can also make a bootable live USB memory stick or flash drive. It works faster than the live DVD. If you have a USB 3.0 port in your computer/laptop (the blue one) be sure to buy a USB 3.0 flash memory (the blue one) to use with the distribution. It will work much much faster and the speed will be nearly the same as a hard disk installation.

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.

It is best to approach Linux distribution by considering them a group of "families". Each family contain a base distro and the distros the are based on it. There are also independent distros.

Debian and Debian-based distros RHEL-based distros SuSe and OpenSUSE Arch and Arch-based distros Gentoo Slackware Independent distros
Debian RHEL SuSe and OpenSUSE Arch Linux Gentoo Slackware Solus
MX Linux (based on Debian) Fedora GeckoLinux Manjaro Sabayon Absolute Linux PCLinuxOS
AntiX Linux (based on Debian) AlmaLinux ArcoLinux Redcore Linux Slackel Mageia
Ubuntu Oracle Linux Chakra GNU/Linux Calculate Linux Zenwalk Linux KaOS
PopOS! (based on Ubuntu) Hyperbola GNU/Linux-libre Funtoo AUSTRUMI OpenMandriva
Linux Mint (based on Ubuntu) Parabola GNU/Linux-libre Linux Console
ElementaryOS (based on Ubuntu) ArchBang Linux Slitaz
ZorinOS (based on Ubuntu) Namib GNU/Linux Tiny Core Linux
Linux Lite (based on Ubuntu) EndeavourOS ALT Linux
Void Linux

Trying out Linux & FOSS

There are several ways to try out Linux:

  • Buy a used desktop/laptop and install Linux on it. This is the safest method.
  • Use a virtual machine to run Linux inside Windows.
  • Use Windows Subsystem for Linux (WSL) on Windows 10. This method will give you access to command line CLI only version of Linux (mainly Debian and Ubuntu).
  • Boot from a live DVD/USB on your currently used computer.
  • Dual boot with Windows (not very safe. You may risk losing your data if you don't know what you are doing)
  • Buy the Raspberry Pi 4 or a Raspberry pi 400 single board computer SBC.
  • Use Free & open source software on Windows or MacOS such as Libre office, Gimp, SMplayer, VLC, Audacity, Openshot and many others. You can visit this page and look for bold item in the Windows columns. These are the Windows versions of Linux FOSS.
  • Use Distrotest website. You can try many distros online.

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 18.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, CD or USB flash drive 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

Modern Linux distributions allow you to do most of your work in the [graphical user interface], much as you do in Windows. But to access the full power of Linux, 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.

Do I need the command line?

The answer to that question depends on what you want to do with your Linux system and also on which distribution you have installed. Some "distros" like Slackware, Arch and Gentoo are designed for Linux experts and expect some knowledge of the command line. Those that new users are usually directed to, like Linux Mint, Ubuntu and AntiX, provide graphical tools for most of what you want to do.

However, it is always worth learning how to use the command line because you can do so much more with it. The command line interface can allow you to:

  • use any command on your system, not just those commands for which someone has created an icon or a menu option
  • access any file on your system without having to move to the directory/folder that contains it
  • make use of a very fast interface for file management compared with using a graphical file manager
  • diagnose and fix problems.

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.

Multimedia

Audio

Open-source formats Proprietary formats
Ogg vorbis WMA
Flac
Wav
Spx
Opus
MP3

Video

DVD Playback

On Linux, DVD support is provided through the libdvdcss or libdvdcss2 packages.

To install libdvdcss on Ubuntu 18.04, open a terminal and type"

sudo apt install libdvdcss2

or

sudo apt install libdvdcss

You should now be able to play DVDs on Ubuntu flavors as well as other Debian-based Linux distros.

Reference: [16]

Adobe Flash

Since Adobe no longer supports Flash Player after December 31, 2020 and blocked Flash content from running in Flash Player beginning January 12, 2021, Adobe strongly recommends all users immediately uninstall Flash Player to help protect their systems.

Updating and upgrading your distribution

First of all, You should identify your distribution name and version. To update vs to upgrade vs to dist-upgrade on Debian-based and Ubuntu-based distros:

Debian-based: MX Linux, AntiX and others.

Ubuntu-based:

Ubuntu and its flavours: Kubuntu, Lubuntu, Xubuntu, Unbuntu Mate, Ubuntu Budgie.

Linux Mint, ZorinOS, Elementary OS, POP_OS!

To update packages information from all sources:

sudo apt update

This command update the list of packages from the repositories including their version, information and dependencies. If you didn't issue this command before the commands in the following sections you may get an error because the system will try fetch a copy of a package that doesn't exist anymore or an outdated version that was removed from the repositories.

To upgrade a certain package:

sudo apt install <package name>

where <package name> is the name of the package you want to install. for example, if you have Firefox browser version 72 and you want to upgrade to the latest version issue the following command:

sudo apt install firefox

To upgrade the whole system from a Long Term Support version to the next LTS version (for example, from Ubuntu 18.04 LTS to 20.04 LTS)

This applies to Ubuntu and its flavors: [17]

For Linux Mint:

For Elementary OS: There is no way to upgrade from a major version of Elementary OS to the next major version; You will have to reinstall.

For Pop_OS! : [18]

for Zorin OS


For Debian: [19]

For MX Linux

For AntiX

Hardware

Printers

HP and Brother printers have open source drivers for Linux. They easily work on Linux. Some Samsung printers work out-of-the-box on Ubuntu-based distributions. Old Canon printer models won't work with modern Linux distributions.

Scanners

Mutifunction Printers

Wifi cards and dongles

USB dongles
Internal WiFI cards

Video cards (GPUs)

Major vendors of video cards (GPUs: Graphical processing units) are Intel, AMD, and Nvidia.

Intel and AMD video cards drivers are open source. So, there is no need to do anything to make them work properly.

Nvidia cards have two types of drivers:

a) Nouveau driver: open source. The default driver in any distribution. Preinstalled out-of-the-box in most distros.

b) Proprietary driver: closed source. It Needs to be installed manually. It gives better performance for games.

PopOS! has a specific version for devices with Nvidia GPUs. It comes with the proprietary driver preinstalled. You choose this version to download if you don't mind using closed source software.

Ubuntu 20.04 and Zorin OS have much simplified method for installing the proprietary driver the the GUI or the command line. For Ubuntu 20.04 see [20]. For Zorin OS see [21].

Elementary OS and Linux Mint have a command line method only.

For installing Nividia drivers on Ubuntu 18.04 see [22].

Debian, MX Linux and AntiX have a command line method [23]. It is more suitable for advanced users.

Soundcards

Webcams

Keyboards

Mouses

Satellite cards

Hard disks

External hard disks

Some USB hard disk with the capacity of more than 2 TBs or more has the exFAT filesystem to be readable on Windows 7. Because Windows 7 doesn't support NTFS partitions with the capacity of more than 2 TBs on external drives, these drives has to be formatted in exFAT. ExFAT is the Microsoft-developed file system that’s used in Windows and in many types of storage devices like SD Cards and USB flash drives. Kernel 5.4 brings native exFAT support to Linux.

Internal hard disks

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

Lean how to install applications in Linux.

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