This is an assignment h1 - Linux palvelimet ICT4TN021-7 in Haaga-Helia University of Applied Sciences

In this assignment we had to create live Linux USB-drive and install Linux with it. Along side this we had an assignment of installing few new softwares (softwares that you haven’t used before) and run few basic terminal commands on return the output.

I’m far from Linux guru so to say, but I do use Linux as my main OS in everyday use. So, somewhat, know my way around Linux. That being said, running and managing servers are somewhat new thing for me so hopefully this course can teach me a thing or two in that field. I do own basic knowledge about that topic since I’ve been running few small VMs for different purposes (mainly hosting small applications). But anything advanced about servers are beyond me.

Aside from that, I also intend to use this course the get the hang of blogging!

Creating USB-drive on Linux

I use Arch Linux x86_64 as my main OS so some commands might differ if you use different Linux distribution.

I started creating this live Linux USB-drive by formatting my USB-drive. When you’re formatting any drive in Linux, good thing to remember is that Windows users can’t access files that are formatted to Linux ext3 or any other mode. So if you want to use your drive in Windows remember to format your drive to FAT32.

Formatting USB-drive with FAT32

I had already an empty USB-drive, but if you need to format yours on Linux, Guillermo Garron has made a nice blog post about formatting USB-drives with FAT32 on Linux systems in his blog.

How to format a usb drive with FAT32 file system on Linux

Creating Bootable USB-drive from Terminal

In UNIX systems there is a command-line utility called dd which primary purpose is to convert and copy files. We can use this utility to make bootable USB-drive easily from the terminal.

Before we can make this bootable USB-drive, we need to plug it in and check it with:

$ sudo fdisk -l

Which outputs something like this:

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 6AEC0850-AFB2-4DCF-92A8-3EBFC35D339C

Device        Start        End    Sectors   Size Type
/dev/sda1      2048    2099199    2097152     1G EFI System
/dev/sda2   2099200   18876415   16777216     8G Linux swap
/dev/sda3  18876416 1953525134 1934648719 922.5G Linux filesystem




Disk /dev/sdc: 7.3 GiB, 7811891200 bytes, 15257600 sectors
Unitssudo lsblk: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Or

$ lsblk

Which outputs something like this:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0     1G  0 part /boot
├─sda2   8:2    0     8G  0 part [SWAP]
└─sda3   8:3    0 922.5G  0 part /
sdc      8:32   1   7.3G  0 disk 
sr0     11:0    1  1024M  0 rom

Running these commands returns all the disks that are connected to your computer. From that output we can see what the USB-drive is called in your computer. E.g. for me USB-drive was /dev/sdc, yours might be different.

After you’ve checked your drive with those commands we cant start making the bootable USB-drive. In Linux that is very easy and fast, since you can make that with only one command:

$ sudo umount /dev/sdxx

Where xx represents letter and number of your drive, e.g. /dev/sdc1.

$ sudo dd if=/path/to/iso of=/dev/sdX bs=4M && sync

Where /path/to/iso is the location of your .iso file and /dev/sdx/ is your USB-drive (which can be verified by the commands above) Update: This command also calls sync when the dd finishes. sync makes sure that the data is fully written to the physical media.

After that is done you should have a bootable USB-drive that can be used for installing your new OS (e.g. Linux!).

Update 27.1.2018: Updated commands.

Update 11.2.2018: I’m not reporting the whole installation process of Arch Linux here since it deserves its own post. Read more about Arch Linux’s installation at ArchWiki.

Listing Your Computer’s Hardware

If you want to list the hardware in your computer, that can be done with one simple command:

$ sudo lshw -short -sanitize

Which outputs for me the following:

H/W path               Device      Class          Description
=============================================================
                 system         20250 (LENOVO_MT_20250)
/0                                 bus            Durian 7A1
/0/0                               memory         128KiB BIOS
/0/4                               processor      Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
/0/4/b                             memory         32KiB L1 cache
/0/4/c                             memory         256KiB L2 cache
/0/4/d                             memory         6MiB L3 cache
/0/a                               memory         32KiB L1 cache
/0/2a                              memory         8GiB System Memory
/0/2a/0                            memory         4GiB SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/2a/1                            memory         DIMM [empty]
/0/2a/2                            memory         4GiB SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/2a/3                            memory         DIMM [empty]
/0/100                             bridge         Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller
/0/100/2                           display        4th Gen Core Processor Integrated Graphics Controller
/0/100/3                           multimedia     Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller
/0/100/14                          bus            8 Series/C220 Series Chipset Family USB xHCI
/0/100/14/0            usb3        bus            xHCI Host Controller
/0/100/14/0/2                      input          Microsoft 5-Button Mouse with IntelliEye(TM)
/0/100/14/0/3                      input          Ghost Key Elimiantion Keyboard
/0/100/14/0/4          scsi6       storage        Flash Card Reader/Writer
/0/100/14/0/4/0.0.0    /dev/sdb    disk           Card  Reader
/0/100/14/0/4/0.0.0/0  /dev/sdb    disk           
/0/100/14/0/5                      multimedia     Lenovo EasyCamera
/0/100/14/0/6          scsi7       storage        Flash Drive
/0/100/14/0/6/0.0.0    /dev/sdc    disk           7811MB SCSI Disk
/0/100/14/0/6/0.0.0/0  /dev/sdc    volume         7450MiB Windows FAT volume
/0/100/14/0/8                      communication  Bluetooth wireless interface
/0/100/14/1            usb4        bus            xHCI Host Controller
/0/100/16                          communication  8 Series/C220 Series Chipset Family MEI Controller #1
/0/100/1a                          bus            8 Series/C220 Series Chipset Family USB EHCI #2
/0/100/1a/1            usb1        bus            EHCI Host Controller
/0/100/1a/1/1                      bus            USB hub
/0/100/1b                          multimedia     8 Series/C220 Series Chipset High Definition Audio Controller
/0/100/1c                          bridge         8 Series/C220 Series Chipset Family PCI Express Root Port #2
/0/100/1c/0            wlp1s0      network        Wireless 7260
/0/100/1c.2                        bridge         8 Series/C220 Series Chipset Family PCI Express Root Port #3
/0/100/1c.2/0          enp2s0      network        QCA8171 Gigabit Ethernet
/0/100/1d                          bus            8 Series/C220 Series Chipset Family USB EHCI #1
/0/100/1d/1            usb2        bus            EHCI Host Controller
/0/100/1d/1/1                      bus            USB hub
/0/100/1f                          bridge         HM86 Express LPC Controller
/0/100/1f.2                        storage        8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode]
/0/100/1f.3                        bus            8 Series/C220 Series Chipset Family SMBus Controller
/0/1                   scsi2       storage        
/0/1/0.0.0             /dev/cdrom  disk           DVD-RAM UJ8DB
/0/2                   scsi5       storage        
/0/2/0.0.0             /dev/sda    disk           1TB ST1000LM014-SSHD
/0/2/0.0.0/1                       volume         1023MiB Windows FAT volume
/0/2/0.0.0/2           /dev/sda2   volume         8191MiB Linux swap volume
/0/2/0.0.0/3           /dev/sda3   volume         922GiB EXT4 volume
/1                                 power          CRB Battery 0
/2                                 power          OEM_Define5

Install New Softwares

Part of the assignment was to install three new softwares and use them in their designated uses.

1. Guake

Guake Terminal

Guake at GitHub

Install Guake in Arch Linux

$ sudo pacman -S guake

I’m not a big gamer nowadays but “back in the day” I spent a lot of time playing Quake and especially QuakeWorld and to this day I go back to it every once in awhile. So this kind of drop-down terminal was kind of nostalgic for me! I doubt that I will be using this as my main terminal, but it is a nice little niche software.

Guake

Guake uses GPL v2.0 license. Read more about GPL v.2.0.

2. Ranger

Ranger

Ranger at GitHub

Install Ranger in Arch Linux

$ sudo pacman -S ranger

I’m a big fan of terminal softwares and I tend to use them over different GUI-softwares. But when it comes to file managers I’ve always enjoyed the GUI option in that field. Ranger is something that could change that for me if I would just spent the time with it.

Ranger basically is a simple vim-like (yuck!) file manager with high customizability.

Ranger

Ranger uses GPL v3.0 license. Read more about GPL v3.0

3. Calcurse

Calcurse

Calcurse at GitHub

Install Calcurse in Arch Linux

$ sudo pacman -S calcurse

Calcurse is another terminal software that I’ve been using quite a lot. Calcurse is text-based personal organizer which is a great way to keep up with your to-do and appointments directly from your terminal.

Calcurse

Calcurse uses BSD-2-Clause license. BSD-2-Clause is also known as “Simplified BSD License”. Read more about BSD-2-Clause

Update 23.1.2018: Added links to projects and their respected licenses. Update 24.2.2018: Removed Ubuntu commands from this part as unnecessary.

Proprietary Software and Their Libre Counterparts

Last part of our assignment was to list different proprietary softwares and then list their libre counterparts.

Adobe Photoshop - GIMP

One of the biggest examples of proprietary and libre are definitely Adobe’s Photoshop and it’s libre counterpart GIMP. Photoshop has been the de facto software in image editing and that title isn’t most likely going anywhere in a while and unfortunately licenses to Photoshop are quite expensive. Thankfully Photoshop has a great free counterpart called GIMP (GNU Image Manipulation Program). GIMP is completely free, has a lots of great features in it and a great community behind it.

Of course if you work professionally in that field unfortunately GIMP isn’t going to cut it, since Photoshop is so much more feature rich that GIMP can’t compete with that. But for basic image editing it’s a great tool.

Microsoft Office - LibreOffice

Another big example of this are Microsoft’s Office package and it’s libre counterpart LibreOffice. Here is the same case as above. MS Office is widely used in different businesses and schools, but it’s licenses are also quite expensive. Thankfully at least in my school we can have MS Office free via our school. MS Office’s libre counterpart LibreOffice really well made with lots of features and great community behind it and again it’s completely free!

For example in my case I use LibreOffice for different school assignments and that has been working fine for me. I also don’t use Windows so I can’t use MS Office straight from the package. Via Wine it works fine but I’ve opted out on just staying with LibreOffice.

Free Software Foundation has gathered a great list of Free Software for Education which I recommend to read, but that’s still a short list, since there are a ridiculous amount different proprietary software and their libre counterparts.