{"id":324,"date":"2021-04-02T17:36:12","date_gmt":"2021-04-02T17:36:12","guid":{"rendered":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/?p=324"},"modified":"2021-05-14T00:23:20","modified_gmt":"2021-05-14T00:23:20","slug":"linux","status":"publish","type":"post","link":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/2021\/04\/02\/linux\/","title":{"rendered":"Linux"},"content":{"rendered":"\n<p><span class=\"has-inline-color has-black-color\"><strong>Linux<\/strong> is a family of open-source Unix-like operating systems. It is an OS just like Windows,  iOS, and Mac OS. In fact, one of the most popular platforms on the planet, Android, is powered by a Linux kernel (more on that later) .  An operating system is software that manages all of the hardware resources associated with your desktop or laptop. To put it simply, the operating system communicates with the hardware so that it could perform the tasks that a specific software requires or meet the needs  of the programmer. Without the operating system (OS), the software would not function.<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-content\/uploads\/sites\/31\/2021\/04\/linux_blog1-1024x576.png\" alt=\"\" class=\"wp-image-336\" srcset=\"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-content\/uploads\/sites\/31\/2021\/04\/linux_blog1-1024x576.png 1024w, https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-content\/uploads\/sites\/31\/2021\/04\/linux_blog1-300x169.png 300w, https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-content\/uploads\/sites\/31\/2021\/04\/linux_blog1-768x432.png 768w, https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-content\/uploads\/sites\/31\/2021\/04\/linux_blog1-1536x864.png 1536w, https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-content\/uploads\/sites\/31\/2021\/04\/linux_blog1.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption><strong>Typical user interface: Pop! OS<\/strong><\/figcaption><\/figure>\n\n\n\n<p><span class=\"has-inline-color has-black-color\">So, why do we care about Linux?<\/span> <span class=\"has-inline-color has-black-color\">This is the one question that most people ask.  Why bother learning a completely different computing environment, when the operating system that ships with most desktops, laptops, and servers works just fine?<\/span> Well, here we provide a few incentives:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><span class=\"has-inline-color has-black-color\">Why switch to Linux<\/span><\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li><span class=\"has-inline-color has-black-color\"> Linux is distributed under an open source license. Open source follows these key tenants:<\/span><ul><li><span class=\"has-inline-color has-black-color\">The freedom to run the program, for any purpose. This means that not only you can see the code running behind the operating system, but you can also modify to suit your purposes. That is one of the reasons why the majority of the supercomputers run on Linux, as developers can programme it in a way to meet the scientific requirements exactly, or automate all tasks instantly. <span class=\"has-inline-color has-black-color\"><\/span><\/span><\/li><\/ul><ul><li><span class=\"has-inline-color has-black-color\">The freedom to distribute copies of your modified versions to others. While this is mostly reserved for experienced developers, this means that anyone who is interested in Linux and spot a place for improvement, can modify it and distribute it to the others. <\/span><\/li><li><span class=\"has-inline-color has-black-color\">Virus free: Well, almost. Remember than anyone can see the code? Well, imagine that there is a hack or virus. Then it will be immediately spotted by someone and removed straight away. Also, if there is an installed virus, first of all it cannot do anything until you grant it the so called <strong>sudo<\/strong> privileges. This means that even if you are not careful and installed one by mistake, you would still be safe. But even if you grant the virus such privileges, it will only have access to this particular user files. The OS or the other users will not be affected as everything is controlled on a lower level by the <strong>root superuser<\/strong>, which the virus has no access whatsoever, and it can easily be removed from there. Additionally, Windows shares more than 77% of all desktop systems, meaning that it is the primary target for hackers, rather than Linux, which as discussed is also much harder to hack.<\/span><\/li><li><span class=\"has-inline-color has-black-color\">Linux is free! Yes, you heard that right. There are also many different flavours of it, suited for different purposes, but all of the share the good things about Linux. If you ever get bored by one distribution, simply install another.<\/span><\/li><\/ul><\/li><li><span class=\"has-inline-color has-black-color\">Perfect for programmers and software developers. The main reason why people use Linux is to do programming jobs. Even by default, Linux comes with almost all the languages preinstalled already. You want to run a C code? Great, the gcc compiler is installed straight away. Try using Eclipse on Windows and make it recognise MinGW ( a compiler), good luck with that. Such  inconveniences are really annoying for programmers. Installing Python modules or packages? Great, one line of code in the Linux terminal. Not so great fixing errors on Windows the entire day though. You want to pipe commands? Again, easily done on Linux. <\/span><\/li><li><span class=\"has-inline-color has-black-color\">It is faster! Everything feels much faster on Linux, from bootup to using application, to even using something as simple as the file manager, feels and performs faster than their Window&#8217;s equivalents. Personally, I have also found that codes are compiled and executed faster on Linux too.<\/span><\/li><li><span class=\"has-inline-color has-black-color\">System updates? If you are a Windows user, you probably had an occasion where you had to leave your laptop or desktop at a weird time as it does not allow you to use it unless you install some updates. What is more, those updates usually require an entire system reboot and take a long time. None of that is present on Linux. Updates do not require a reboot, unless the kernel is updated, but that is rare, and also, the updates themselves almost happen instantaneously and you can choose when to update them with all the flexibility you want.<\/span><\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"has-inline-color has-black-color\"><strong>Why not to use Linux<\/strong><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li><span class=\"has-inline-color has-black-color\">Bad for gaming: If you are someone who is enjoys gaming, then the sad news is that Linux is not there yet. Steams is available, but there could be compatibility issues.<\/span><\/li><li><span class=\"has-inline-color has-black-color\">While you can Linux on a virtual machine, it is slow and will not perform that well. This means you will need to install it (more on that later), and despite Linux being highly portable, there could be issues, such as drivers recognition. In particular, when I first installed Linux on my laptop, all I could see was a blank screen. Eventually, I managed to resolve the  issue by adding an additional kernel boot parameter, but this would put many people off and it is an inconvenience. <\/span><\/li><li><span class=\"has-inline-color has-black-color\">If you are already working with Mac OS, then you have best of both Linux and Windows, though obviously some things are done better than Linux or Windows, Mac OS is seen as a common ground between the two. Also, if you are developing apps for Windows, then obviously Windows will be a better choice for that. PowerShell in Windows is also catching up with Bash (the most common Linux shell), but in terms of programming, Linux is a more preferable choice. <\/span><\/li><li><span class=\"has-inline-color has-black-color\">Less software developed in general. Since Windows dominates the market, almost all software is developed first on Windows, next comes Mac OS. Since Linux is open-source, few of the commercial software will be available for Linux, so you would have to resort for other alternatives, which might not be that great.<\/span><\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"has-inline-color has-black-color\"><strong>How to install Linux<\/strong><\/span><\/h3>\n\n\n\n<p><span class=\"has-inline-color has-black-color\">If you have decided to install Linux, there are some things you should be aware of. Here we present some steps for installing Linux, but they are by no means a guide, just personal attempts. First of all<\/span>, <strong>do a backup on your files in Windows.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><span class=\"has-inline-color has-black-color\">Partition your HHD or SSD on Windows. This will allow space for Linux to be installed on. This is important as likely we do not want to remove Windows, but rather keep both operating systems. To do that on Windows, when you log into the desktop, right click on the Windows logo at the bottom left corner. Then choose <strong>Disk Management<\/strong>. <\/span><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"940\" height=\"743\" src=\"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-content\/uploads\/sites\/31\/2021\/05\/image.png\" alt=\"\" class=\"wp-image-355\" srcset=\"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-content\/uploads\/sites\/31\/2021\/05\/image.png 940w, https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-content\/uploads\/sites\/31\/2021\/05\/image-300x237.png 300w, https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-content\/uploads\/sites\/31\/2021\/05\/image-768x607.png 768w\" sizes=\"(max-width: 940px) 100vw, 940px\" \/><figcaption><strong>Disk management tool on Windows 10<\/strong><\/figcaption><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li><span class=\"has-inline-color has-black-color\">Then, right click on the OS (C:) and choose <em>Shrink<\/em>. Then, allocate the memory you want to have on your Linux partition. I would recommend around 50Gb at least. <\/span><\/li><li><span class=\"has-inline-color has-black-color\">After that, disable <a rel=\"noreferrer noopener\" href=\"https:\/\/docs.microsoft.com\/en-us\/windows-hardware\/manufacture\/desktop\/disabling-secure-boot\" data-type=\"URL\" data-id=\"https:\/\/docs.microsoft.com\/en-us\/windows-hardware\/manufacture\/desktop\/disabling-secure-boot\" target=\"_blank\">Secure Boot<\/a><\/span><\/li><li><span class=\"has-inline-color has-black-color\">Then download one the Linux distributions, I recommend: <a rel=\"noreferrer noopener\" href=\"https:\/\/ubuntu.com\/#download\" data-type=\"URL\" data-id=\"https:\/\/ubuntu.com\/#download\" target=\"_blank\">Ubuntu<\/a>, <a rel=\"noreferrer noopener\" href=\"https:\/\/pop.system76.com\/\" data-type=\"URL\" data-id=\"https:\/\/pop.system76.com\/\" target=\"_blank\">Pop_OS!<\/a> or <a href=\"https:\/\/linuxmint.com\/download.php\" data-type=\"URL\" data-id=\"https:\/\/linuxmint.com\/download.php\">Linux Mint<\/a>.<\/span><\/li><li><span class=\"has-inline-color has-black-color\">After that download <a rel=\"noreferrer noopener\" href=\"https:\/\/www.balena.io\/etcher\/\" data-type=\"URL\" data-id=\"https:\/\/www.balena.io\/etcher\/\" target=\"_blank\">Etcher<\/a>, and use it to flash a USB stick, at least 4Gb big. <\/span><\/li><li><span class=\"has-inline-color has-black-color\">After this is done, power off you computer<\/span><\/li><li><span class=\"has-inline-color has-black-color\">On the boot up, enter quickly in <a rel=\"noreferrer noopener\" href=\"https:\/\/www.hp.com\/us-en\/shop\/tech-takes\/how-to-enter-bios-setup-windows-pcs\" data-type=\"URL\" data-id=\"https:\/\/www.hp.com\/us-en\/shop\/tech-takes\/how-to-enter-bios-setup-windows-pcs\" target=\"_blank\">BIOS<\/a>, by pressing one of the keys continuously immediately after pressing the power button: F10, F2, F12, F1, F2 or DEL.<\/span><\/li><li><span class=\"has-inline-color has-black-color\">Disable <a rel=\"noreferrer noopener\" href=\"https:\/\/www.asus.com\/us\/support\/FAQ\/1044641\/\" data-type=\"URL\" data-id=\"https:\/\/www.asus.com\/us\/support\/FAQ\/1044641\/\" target=\"_blank\">Fast Boot<\/a> when you are in BIOS and change the <a rel=\"noreferrer noopener\" href=\"https:\/\/www.lifewire.com\/change-the-boot-order-in-bios-2624528\" data-type=\"URL\" data-id=\"https:\/\/www.lifewire.com\/change-the-boot-order-in-bios-2624528\" target=\"_blank\">boot order<\/a> to boot from the USB drive in Linux<\/span><\/li><li><span class=\"has-inline-color has-black-color\">After booting into Linux, first check if everything is working in terms of speakers, microphone, display, no weird screen flickering, no crashes on the built-in apps and so on. If none of these issues are present, then find the install icon on the desktop and press it<\/span><\/li><li><span class=\"has-inline-color has-black-color\">Modern versions of Linux will guide you easily through the installation, but the most important thing is of course choosing the right partition to install your Linux, do not erase your Windows! For a complete guide, see: <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/watch?v=Z-Hv9hOaKso\" target=\"_blank\">https:\/\/www.youtube.com\/watch?v=Z-Hv9hOaKso<\/a>.<\/span><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"has-inline-color has-black-color\"><strong>Removing Linux<\/strong><\/span><\/h3>\n\n\n\n<p><span class=\"has-inline-color has-black-color\">If you have installed Linux and decided to remove it, then:<\/span><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><span class=\"has-inline-color has-black-color\">Boot in Windows<\/span><\/li><li><span class=\"has-inline-color has-black-color\">Go to Disk management and delete the partition where Linux is installed, by right clicking on it. Remember OS (C:) is your Windows, do not delete that. After that extend the OS (C:) partition to take the entire available space.<\/span><\/li><li><span class=\"has-inline-color has-black-color\"><strong>DO NOT REBOOT<\/strong>: When installing Linux, it has installed its own bootloader, called grub for most distributions, that allows you to easily switch at the start from Linux to Windows when you boot your computer. It overwrites the Windows bootloader, hence if you reboot now, grub will appear, but it will be broken and you will not be able to boot back in Windows, unless you enter in BIOS again. To remove grub, follow the instructions here: <a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/watch?v=ZTMCKOx5Jz0\" target=\"_blank\">https:\/\/www.youtube.com\/watch?v=ZTMCKOx5Jz0<\/a>.<\/span><\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Linux is a family of open-source Unix-like operating systems. It is an OS just like Windows, iOS, and Mac OS. In fact, one of the most popular platforms on the planet, Android, is powered by a Linux kernel (more on that later) . An operating system is software that manages all of the hardware resources&hellip; <br \/> <a class=\"read-more\" href=\"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/2021\/04\/02\/linux\/\">Read more<\/a><\/p>\n","protected":false},"author":32,"featured_media":331,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-324","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-json\/wp\/v2\/posts\/324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-json\/wp\/v2\/comments?post=324"}],"version-history":[{"count":22,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-json\/wp\/v2\/posts\/324\/revisions"}],"predecessor-version":[{"id":389,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-json\/wp\/v2\/posts\/324\/revisions\/389"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-json\/wp\/v2\/media\/331"}],"wp:attachment":[{"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-json\/wp\/v2\/media?parent=324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-json\/wp\/v2\/categories?post=324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/martin-dimitrov\/wp-json\/wp\/v2\/tags?post=324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}