Tag: Computer

  • Linux Tutorial Series – 16 – Command history and cursor movement

    Here is the video version, if you prefer it:

    Did you know you can use the Up/Down arrows on your keyboard to see previous commands you executed in the Linux shell? Did you know that you can use Left/Right arrows to move your cursor? (Shotts, 2019)⁠

    If you did not, now you do. If you did, great for you!

    Hope this helped.

    References

    Shotts, W. (2019). The Linux Command Line, Fifth Internet Edition. Retrieved from http://linuxcommand.org/tlcl.php. Page 27

  • Linux Tutorial Series – 15 – Talking about time – date and cal

    Here is the video version, if you prefer it:

    Today, let’s talk about two time-related commands in the shell. They are called date and cal. (Shotts, 2019)⁠

    date gives you the current time:

    mislav@mislavovo-racunalo:~$ date

    Sun 22 Dec 2019 12:11:15 PM CET

    cal gives you the calendar:

    mislav@mislavovo-racunalo:~$ cal

    December 2019

    Su Mo Tu We Th Fr Sa

    1 2 3 4 5 6 7

    8 9 10 11 12 13 14

    15 16 17 18 19 20 21

    22 23 24 25 26 27 28

    29 30 31

    Obviously, applications of this are vast. Let’s say you freeze yourself and wake up 70 years in the future. Of course you’re not going to ask some human what year is it! That would be ludicrous! Instead, you will find the first computer with Linux and run the commands you learned from this article. I just saved your life 70 years in the future. You are welcome.

    References

    Shotts, W. (2019). The Linux Command Line, Fifth Internet Edition. Retrieved from http://linuxcommand.org/tlcl.php. Page 28

  • Linux Tutorial Series – 14 – Starting a shell session

    Here is the video version, if you prefer it:

    To start a shell session, find Terminal on your Linux distribution (via the graphical user interface) and click on it. That should start a shell session, which means you can type in commands!

    We will be writing some commands in the very next article, so stay tuned!

  • Linux Tutorial Series – 13 – What is a command?

    Here is a video version, if you prefer it:

    This may be a very simple question – what is a command? What is a command in the context of the Linux shell environment?

    Commands are, in essence, running a program with options and arguments. (Barrett, 2016)⁠ If you write, for example, ls -l file.txt, you are calling a program called ls with the option -l and the argument file.txt. But wait a minute – how does the operating system know where to find the ls program? This is not the focus of this article so we don’t currently care. As far as we are right now concerned, the operating system “does its magic” so it can find the program ls and call it with the specified options.

    There are a lot of things you can do with commands – commands can be piped, meaning output of one command is input to another and there can exist scripts which within themselves contain lots of commands. But again, essentially, a command is just a single program, with its options and arguments.

    Hope you found this useful!

    References

    Barrett, D. J. (2016). Linux pocket guide (3rd ed.). O’Reilly Media. Pages 3-4

  • Linux Tutorial Series – 12 – What is a shell?

    Here is the video version, if you prefer it:

    The shell, the shell… We all heard that. We know you can type some command in the shell in a Linux environment and get some output. But what does the shell actually mean?

    “A shell is a program that runs commands”, says (Ward, 2014)⁠. That is basically it. You type some commands in, the shell executes them, then you get some output. Shell scripts, another popular term, are essentially just commands typed in a file called a shell script; so the shell has the same job – execute commands.

    There are multiple kinds of shells. You can find more information here: (“5 Most Frequently Used Open Source Shells for Linux,” n.d.)

    Before I end, it is important to note that programs like Terminal are not actually shells – they are graphical user interfaces running shell on your behalf. (Barrett, 2016)⁠ Figure 1 depicts this. This program with a graphical user interface, called a terminal emulator, interacts with the shell. (Shotts, 2019)⁠

    Figure 1 – Relationship between graphical user interfaces to the shell and the shell itself (modeled after figure on page 15 of (Barrett, 2016)⁠)

    Hope you learned something new!

    References

    5 Most Frequently Used Open Source Shells for Linux. (n.d.). Retrieved December 22, 2019, from https://www.tecmint.com/different-types-of-linux-shells/

    Barrett, D. J. (2016). Linux pocket guide (3rd ed.). O’Reilly Media. Page 15

    Shotts, W. (2019). The Linux Command Line, Fifth Internet Edition. Retrieved from http://linuxcommand.org/tlcl.php. Page 26

    Ward, B. (2014). How Linux Works: What Every Superuser Should Know (2nd ed.). No Starch Press. Page 12

  • Linux Tutorial Series – 11 – Checkpoint

    Here is the video version, if you prefer it:

    In the following section of the posts, we will talk about some really foundational things, such as what is a shell, what is a command, what are absolute and what are relative paths and so on.

    All of the conceptual things covered here will be of crucial importance later on, so it pays to pay attention.

    Talk soon!

  • Linux Stories #1 – Interview with Daniel J. Barrett (author of Linux Pocket Guide)

    In this podcast episode of Linux Stories, I interview Daniel J. Barrett, the author of Linux Pocket Guide book, which is among the 3 books I based my Linux tutorial series on.

    Here is the video:

    Here is the audio:

    https://soundcloud.com/mislav-juri-993274625/linux-stories-1-interview-with-daniel-j-barrett-author-of-linux-pocket-guide

    Let me know what you thought!

    Links mentioned in this podcast episode:

    Note: After the interview, Daniel sent me an email with a script showcasing some in-depth Linux command line features. See the script and the instructions on how to run it here.

    Timestamps:

    • 00:00 – 00:55 – Introduction
    • 00:55 – 05:19 – Dan’s career path
    • 05:19 – 10:11 – Dan’s startup experience
    • 10:11 – 13:02 – Dan’s experience with music
    • 13:02 – 23:14 – How did Dan’s understanding of Linux evolved over the years
    • 23:14 – 25:08 – Does Dan prefer Linux over other operating systems?
    • 25:08 – 28:27 – Can people who use computers professionaly benefit from knowing Linux?
    • 28:27 – 31:34 – Can everyday people and people who want to become software engineers benefit from learning Linux?
    • 31:34 – 34:35 – Dan’s Google Education job
    • 34:35 – 35:44 – Parting thoughts
  • Linux Stories #0 – Introduction

    In this introductory podcast episode, I explain what the Linux Stories podcast is going to be about.

    Here is the video:

    Here is the audio:

    https://soundcloud.com/mislav-juri-993274625/linux-stories-0-introduction

    Let me know what you thought!

  • Linux Tutorial Series – 10 – Recap

    Here is the video version, if you prefer it:

    We have talked about what an operating system is – it is a very useful piece of software which enables you to communicate with the hardware conveniently. We also talked about the kernel and learned that it manages processes, memory, device drivers and system calls, as well as established that users are people that use the computer and each one has (or should have) a user account associated with him/her.

    We established that there is a difference between the user space and the kernel space, as well as there being a difference between regular users and superusers. Kernel space is only accessible to the operating system, while the user space is where the user programs reside. Superusers get to execute certain commands that regular users can’t (don’t have the permission to). We learned that a Linux distribution is an operating system made from a software collection that is based upon the Linux kernel.We also talked about some Linux installation details.

    Hope this served as a good review!

  • Linux Tutorial Series – 9 – Installing Linux

    Here is the video version, if you prefer it:

    In this article, I will explain how to install Linux on your machine. I will assume you are installing Debian (Debian 9 to be specific), but most likely any Linux distribution will have a similar installation process. If not, there is a website called Google, through which you can find guides that guide you through the specifics of your installation.

    When I installed Debian on my PC, I pretty much just clicked “Next” all the time. I used the default settings. Nothing fancy. The only setting up I had to do was when I was creating my partitions. Partitions are subdivisions of your hard disk drive or your solid state drive. Partitions enable you, so to speak, divide up your disk into different compartments. We will talk more about this later on, but a guide I used for this (and you can use for this) is (Trivedi, n.d.).

    There is also one thing I was uncertain about, which is swap. Swap is a part of your hard disk drive (and when I say hard disk drive, I mean solid state drive as well, if you have one) that you can use if you run out of Random Access Memory (RAM). So for example, if I have 8 Gigabytes (GB) of RAM⁠, and if I need 9 GB to run all my processes (since all processes reside in RAM) I need 1 additional GB of RAM. That additional 1 GB gets taken from the swap space. Swap space is also used when you hibernate your computer. (“SwapFaq,” n.d.)⁠ I found a really good guideline for swap space here – (“I have 16GB RAM. Do I need 32GB swap?,” n.d.). The second answer from the top contains a nice table. There are other guides on this website called Google, feel free to use them, but in general I think that if your swap is at least the size of your RAM, that’s going to be fine.

    A note: You can also install Linux on a virtual machine and learn how to use Linux via a virtual machine, or maybe you can have a dual boot with both Windows and Linux and slowly switch over to Linux. I personally found those approaches to be less effective. The reason was that I would keep using Windows over Linux, even though I knew I should use Linux. Maybe for you this will work, so I am mentioning it here.

    A Google search for “How to set up Linux on VirtualBox” (VirtualBox is used for virtualization) can help you set that up.

    Hope this helped!

    References

    I have 16GB RAM. Do I need 32GB swap? (n.d.). Retrieved December 22, 2019, from https://askubuntu.com/questions/49109/i-have-16gb-ram-do-i-need-32gb-swap

    SwapFaq. (n.d.). Retrieved December 22, 2019, from https://help.ubuntu.com/community/SwapFaq

    Trivedi, Y. (n.d.). How to Choose a Partition Scheme for Your Linux PC. Retrieved December 22, 2019, from https://www.howtogeek.com/howto/35676/how-to-choose-a-partition-scheme-for-your-linux-pc/