Beruflich Dokumente
Kultur Dokumente
A bit of history
What is Linux? A short answer to this question is "a computer operating system based on
Linux kernel and GNU tools and libraries". In order to understand what Linux is, first we need to
know different concepts such as Linux, kernel, and GNU. Formally, Linux is not an operating
system. It's just a software component working as a bridge between applications and the data
processing done by the hardware. Because of this fact, the kernel is the core component of an
operating system. First Linux kernel was written by Linus
Torvalds in 1991. Usually, the term Linux is used to refer to a
whole operating system based on the kernel. However, an
operating system needs more components to be complete. At this
point, there are a number of operating system based on Linux
kernel, plus a set of tools provided by the GNU open source
project.
What are GNU tools? Well, first of all we should learn
about the GNU project. Basically, this is an open source project
started by Richard Stallman with the goal of building a set of
software components and tools to avoid the use of any software
that is not free. Now that we've learned about Linux, kernel, and
GNU, we can define a distribution as a composition of Linux
kernel and GNU tools and other useful software. We've just
Linux mascot: Tux the penguin
mentioned a new conceptdistribution. Have you heard about
Ubuntu, Fedora, or Debian? These three are examples of Linux
distributions. A Linux distribution can be defined as a whole operating system providing a kernel, a
system of base tools, and a complete set of applications ready to use for users. This guide is based
on Linux Mint, a distribution that started back in 2006 with a goal to be fully usable on the desktop
computers.
Majority of Linux distributions use a boot loader named GRUB (Grand Unified Boot Loader)
which handles booting different OSes from different hard drives, partitions and file systems. Boot
loader is a piece of software usually installed in the first 512KB of the Master Boot Record (MBR)
on the first hard drive. As you know, hard drives are divided into partitions and each partition uses a
file system. Linux OSes name physical hard drives as SDA, SDB, SDC and so on, where SDA is
the first physical disk, SDB is the second physical disk etc. S in the name stands for SATA, D
for the disk. When we add partitions to the mix numbers are added. So, the first partition on the first
hard drive is SDA1, second partition will be named SDA2 and so on. Following this convention
you can easily know that the fourth partition on the third disk will be named SDC4.
All partitions are attached to the system via a mount point. The mount point defines the
place of a particular data set in the file system. Mount points are directories. These empty
directories will be the starting point of the partitions that are attached to them.
Linux distributions also use a different partition mounting scheme than Windows. In a
Windows installation you typically have C and D partitions; first one for the OS itself, and the
second for user data. Linux installation also uses two partitions. Root partition, mounted to / , is
where the system is installed, while the other partition which is mounted to /home is the place for
each users data files and software preferences. In addition to root and home partitions, sometimes a
swap partition is needed, typically for systems with 1GB or less of RAM. Swap partition is used as
a virtual memory when the OS runs out of physical RAM. On Windows OSes this is known as the
page file.
Windows
Physical location
Name
Linux
Mount point
Name
Mount point
disk(0)rdisk(0)partition(1)
sda1
disk(0)rdisk(0)partition(2)
sda2
/home
Editions
As other operating systems, Linux Mint has different editions or
flavors. Basically, we can find two main editionsone based on Debian,
which is called Linux Mint Debian Edition (LMDE), and another one
based in Ubuntu. In addition to Ubuntu and Debian software repositories,
Linux Mint uses its specific ones. LMDE is a rolling release. This means
the distro constantly receives updates without generating releases.
However, releases for the regular Mint edition (the one based on Ubuntu
which we will use) are only generated by following a specific period of
time. Despite LMDE being faster and more responsive than Linux Mint,
non-advanced users should think again before using it because continuous
updates can bring some errors that they might find difficult to solve.
On the other hand, Linux Mint is easy to maintain and was designed to offer an unbeatable
user experience.The Linux Mint project distributes each edition through different ISO images, each
being ready to be burned on a DVD. Regarding the regular edition of Linux Mint, we can find eight
different ISO images. Well, we only have four that are really different, because each one has its own
equivalent in 32b and 64b. Four different desktop environments are includedMATE, Cinnamon,
KDE, and Xfce. This guide will focus on Linux Mint 64bit with Cinnamon desktop environment.
Hardware requirements
Device
Minimum
Optimal
CPU
1GHz 32bit
1GHz 32bit
RAM
512MB
1GB
HDD
8GB
8GB
VGA
Installation
1. Reboot your computer and select your USB drive as the device for booting.
2. After boot you should see a screen like this. Press Enter and allow it to finish booting
3. After bootup is finished you should see a desktop like this. Linux Mint is usable as a
LiveCD which means it can be used directly from USB or CD drive without installation
4. Double click Install Linux Mint icon and choose your language options
5. Next screen will make sure that your computer can install and run Linux Mint
6. This screen lets you choose installation type. First option will erase your entire HDD and
automatically create partitions. We don't want that, so choose Something else which lets
you create the partitions manually
7. On this screen choose New partition table and proceed with Continue when prompted.
Create two partitions as noted in the introduction: one for the system (root partition) and one
for user data (home partition) like in the picture below. Note the boot loader installation path
is /dev/sda which is the MBR of the first hard drive
9. After time zone, choose your keyboard layout, as in the picture below
10. Last step allows you to enter your name, username and your password
After a few minutes the setup will finish installing Linux Mint and offer you to restart your system.
Boot from the first hard drive and choose Linux Mint from the GRUB boot loader. Login screen
will prompt for your password
Windows. The tools are grouped into different sections, namely Appearance, Preferences,
Hardware and Administration. To access it, click the Menu button and then click System
Settings in the upper left portion of the menu.
Open the Control Center and type resolution in the search box in the upper right corner,
then click the Display icon and confirm with Apply.
Your computer will be assigned a new IP address from a local pool of available addresses when a
network is configured in this way.
A prompt will ask for a password of the user account on the Windows machine. Password must be
enabled for that account if the account is administrative. You can see all the shares enabled on the
Windows machine when you enter the right password.
Users
Linux was built as a multiuser operating system. Each Linux distribution has at least two
users by default, a regular user and a super user called root. This is a special user of the operating
system that is used by the system administrator. The root user has all kinds of permissions over files
and programs. Actually, some specific operations can only be executed through this user. Linux
Mint doesn't enable the root user by default. However, Mint uses special commands that allow users
to become the root user. This means that regular users can execute actions that were initially
reserved for the root user. Also, Mint configures the sudo command (super user do), allowing the
user created during the installation process to become the root user. You were doing some actions as
the root user in the previous chapter while installing and removing packages. That is why you had
to input the password before executing any action that would alter the system.
Adding a user
As we said before, Linux was built as a multiuser operating system where each user has a set
of permissions over files and directories. Lets add another user account. Click the Menu button and
type users in the search box. Search results will offer you to run Users and groups application.
Run it, type your password and click the Add button to add another user account.
There are two types of user accounts on Linux Mint, standard and administrator. A standard
user can't use sudo privileges while an administrator user can. The first user created during the
installation is an administrator user. Now, add a standard user with a password.
Adding this user to the sudo group effectively makes the user an administrator. Be carefull about
this, not everyone should be allowed to change the system configuration.
Linux Mint comes with default applications for internet, multimedia, office and graphics
installed. Let's install SMPlayer instead of default VLC Media Player. Locate the search field in the
upper right corner of Software manager and type smplayer. After a few moments a list will appear
containing every software package related to the search term.
Double click the first item as shown in the picture above, after which info page appears.
Linux distributions include a lot of software that is ready to be installed in a specific format
called a package. Software is organized in different packages and some applications need more than
one package; this fact is called package dependency. Linux Mint uses packages in the Debian
(DEB) format, same as the Ubuntu Linux and Debian operating systems. Packages are usually
retrieved and installed from an internet location. This location is called a repository, and it contains
many software packages ready to be downloaded and installed in your machine. Software Manager
is an application developed by Linux Mint developers specifically for LinuxMint. This tool allows
you to list, install, and remove software. Technically, Software Manager is a frontend for some
commands, such as apt-get and apt-cache. Using a GUI, Software Manager provides an easy and
intuitive way to list, install, and remove software, avoiding the use of the command-line interface.
We've installed SMPlayer, a simple but powerfull multimedia player. As you must have
discovered, it's pretty easy to install software through packages provided by Linux Mint. You only
need to search for a software package and click on the Install button. Obviously, you can install a lot
of different software on your machine following the same process. It's important to know that not
only software distributed in packages can be installed in Linux Mint. However, Mint includes a lot
of software distributed in DEB packages, so this method of installation is advisable. Actually, it's
good practice to use Software Manager to install software on your Linux Mint operating system.
Have a go discover software provided by Linux Mint. When you launch Software Manager, a
window showing you different icons will be displayed. Each icon represents a different category of
software included in Linux Mint. For example,you can see the Internet, Sound and Video, Graphics,
and Office categories, among others. By clicking on each one, you'll have access to packages
belonging to the selected category. You can try and click on a category, take a look at the list of
packages for that category, and try to install one of the packages. This process allows you to
discover interesting software that can be installed on your machine.
Removing software
Previously, we learned how to install software on your Linux Mint machine. Also, it's
interesting and useful to know how to do the opposite step. You can remove installed software on
your machine by following a simple process using the Software Manager tool. Remember that you
can remove software installed by default during the installation process of the operating system or
remove software that you have installed through the Software Manager application.
Similarily to the previous process, open Software manager, search for VLC, double click the
first item and click Remove button.
Updating software
Between the release cycles, Linux Mint developers update some software that is included in
the operating system. This means that the user should check what software has been updated and
they should decide which of this software should be installed on the machine. Occasionally, updated
software only applies minor changes, such as
simple improvements or unimportant bug fixes.
However, at times updated software also
includes important security bug fixes. If we don't
apply them, our machine can be at a serious risk.
That's the reason we frequently check which
software has been updated for our Linux Mint.
Update Manager is an effective application provided by Linux Mint to install new versions
of installed software and to install security updates on your machine. When you launch that
application the first time, you will see only a single item in a list for applying upgrades. This item
indicates that you need to install an upgrade for mintupdate, which is the codename of Update
Manager. Obviously, before applying other upgrades, we need to upgrade the tool itself. Once this
process is finished, Update Manager will be launched again to check which software can be
updated.
The list of software ready to be updated displays different items providing information about
the package name, installed version, and new version available. Also, a number for each item is
displayed. This number ranges from 1 to 5, and it indicates a level based on the importance of the
upgrade. Level 1 indicates that Linux Mint developers certify that a package and packages marked
with this level should be upgraded as soon as possible.Usually, security updates use this level. The
next level is for those packages whose upgrade is recommended by Linux Mint developers. Level 3
indicates that it is safe to apply an upgrade, but Linux Mint developers didn't test it. Packages
marked with level 4 are unsafe, and if you upgrade it, the stability of the system can be affected.
Finally, level 5 is for dangerous packages (in the unstable stage of development or with broken
dependencies), and Linux Mint developers know that they can damage the operating system.
In general terms, it's a good idea to launch the Software Manager frequently and upgrade
only those packages marked as level 1 and level 2. For levels 3, 4, and 5, system administrators and
advanced users should decide about applying upgrades or not themselves. Also, you can mark all
the packages listed or only a few of them. By default, only packages from level 1 to 3 are displayed
in the list for upgrading. You can change this preference by going to Edit | Preferences.
To update your system follow these simple steps:
1. Run Update manager by clicking on Menu, hovering over Administration and clicking
Update manager in the right pane
2. Enter your password to authenticate and change the system configuration
3. After the initial refresh, click Install updates to update the mintupdate package
4. A list of all packages that can be updated will be shown after updating mintupdate Again,
click Install updates to update the whole system.
Executing commands
Linux Mint provides an easy to use shell interpreter called the Terminal. Launch it and note
the prompt, similar to the one in the picture:
Documents Music
podaci
Videos
Templates
The ls is a simple listing which shows only the name of the files and directories which are not
hidden. To show hidden files and directories add the -a command switch. Note that hidden
directories have a dot in front of the name, .dbus for example.
ivica@ivica-VirtualBox ~ $ ls -a
.dbus
Desktop
.bash_history
.gksu.lock
Pictures
.vboxclient-clipboard.pid
gnome2
podaci
.vboxclient-display.pid
.dmrc
.ICEauthority
.profile
Most Linux shell commands also accept wildcards such as asterisk (*) or a question mark (?). An
asterisk replaces any number of characters. We have a directory with many different files, as seen
by executing ls:
ivica@ivica-VirtualBox ~/podaci $ ls
slika2.jpg slika5.jpg tekst11.txt tekst1.txt tekst4.txt
slika3.jpg slika6.jpg tekst12.txt tekst2.txt tekst5.txt
slika4.jpg tekst10.txt tekst13.txt tekst3.txt tekst6.txt
To delete all the pictures from a directory in bulk (not one by one) you would simply execute:
rm *.jpg
This command can be loosely translated as delete every file with any name that has any number of
characters if the extension is jpg. Listing the files again will show that only pictures were deleted:
ivica@ivica-VirtualBox ~/podaci $ ls
tekst10.txt tekst12.txt tekst1.txt tekst3.txt tekst5.txt
tekst11.txt tekst13.txt tekst2.txt tekst4.txt tekst6.txt
Another wildcard, a question mark, is used to replace exactly one character. A simple example
would be to delete the files that have a name with two digits in it, namely tekst10.txt, tekst11.txt
and so on.
ivica@ivica-VirtualBox ~/podaci $ rm tekst1?.txt
The command shown above would delete files tekst10.txt tekst12.txt tekst11.txt tekst13.txt.
Directories can be deleted in a similar manner, except for when they are not empty. Non empty
directories must be deleted recursively, i.e. from the bottom of the directory tree up from last file
up to the directory itself. This can be done with passing an extra argument to the rm command:
ivica@ivica-VirtualBox ~ $ rm podaci/
rm: cannot remove podaci: Is a directory
When we add the -r argument the directory will be deleted:
ivica@ivica-VirtualBox ~ $ rm -r podaci/
Again, there was no output which means that there was no error and the command executed
successfully.
Downloads Public
tekstovi
Videos
Command
Usage
Example usage
pwd
pwd
pwd
Change directory
cd
cd directory name
cd Documents
Create a directory
mkdir
mkdir slike
Create a file
touch
touch imenik.txt
List directory
ls
ls directory name
ls slike/
cat
cat fajl.txt
Delete a file
rm
rm file name
rm fajl.txt
rm -r
rm directory name
rm -r Documents
Copy a file
cp
cp source destination
cp nova_slika.jpg slike/
Move a file
mv
mv source destination
mv nova_slika.jpg slike/
Copy a directory
cp -r
cp -r source destination
cp -r slike/ Documents
Move a directory
mv
mv source destination
mv podaci/ slike/
mv
mv old-name new-name
mv podaci/ tekstovi/
Delete a directory