LINUX – INTRODUCTION TO LPIC (8 June 2022)
In this session, our Linux expert – Linus will introduce what is Linux and what are the benefits of Linux, especially when it comes to home office or Small-medium Enterprise (SME) applications. Linux is an open-source operating system which is more lightweight and open compare to Windows which is more beneficial for home users who just want a very fast computer. Besides, it is also a more suitable operating system in most of the production system. *E-wallet vouchers to be won during the session!!!
Mr Linus Lai
Trainer at Infosyte, Double IE – HCIE Storage & HCIE Routing & Switching, LPIC Certified, RHCE (RedHat Certified)
Linus started off his IT career as server administrator, he is so exceptionally passionate with Linux OS that he decided to name himself after this operating system. Other than server solutions, he also expanded his portfolio in a wide variety of IT technology which include network infrastructure design, project consultation, system implementation and integration. He is one of the very few experts who is holding dual Huawei Certified ICT Expert recognition.
This is a repetition of a session from the last month of May’22 due to an overwhelming response.
Let us begin our journey to start this session so now, to be honest, this session is more towards sharing experiences and also some of the tips which I can recall some of the good some you know. The first question that normally people ask is what Linux is and there’s a lot of misconception about people thought what Linux is and what Linux is not. So first of all Linux is actually a kernel. If you guys are familiar with the kernel, the kernel is basically normally what people say is the heart of the offering system so every operating system needs it. The kernel is particularly for Linux, Linux kernel is something where the kernel itself the piece of software is developed by a group of people and you have other people develop other stuff like for example your graphical interface is developed by another group of people, your apache web server, your engine web server is developed by a different a bunch of people. So this is actually a very interesting part about Linux so but if you want to be more specific Linux is actually just the kernel.
Next, Linux often associates with this open source movement, I have to agree that but remember open source movement can be for windows as well. There are also plenty of other windows software that is actually part of the open source movement and today it has become a trend. Most of the software if you want to develop software you want that software to be popular and you want more people to to contribute the idea, so open source is one of the best choices. I often get questions like how people get to make money by open-sourcing all the quotes to the world. So the answer is very simple, you have so many examples that you can refer to for example people from red hat, people from ubuntu, I would say these two are probably one of the two most successful examples where people can make money by offering support services for people for customers that wanted to use open source software. They also customize to make the software easy and friendly to the customer.
Billions of Chips. Why did I mention billions of chips? Guys think about it how many gadgets at home are powered by Linux? Your smart television, smart refrigerator, smart sensor, and even some of the routers today are powered by Linux. From your phones if you’re using android phones they are most likely running Linux today, I would say very unlikely I would see people still using a phone which is running on windows phone os but here’s the point billions and billions of equipment are powered by Linux. this is actually a fact cost saving for billions as well. So this is actually the same concept of billions of chips powered by Linux. so think about some of the commercial operating systems if they charge for every single chip that you use the software, the os so we have to be paying billions and billions of dollars because we want to use the os.
Cost saving definitely is the last point here. It’s accelerated technologies so Linux open source movement actually did bring the technology to the future and also enhance the pace of development because open source movement, any good talent people can participate in the open source software, to develop and also to contribute the great ideas to develop a better software, and it can be developed 24×7.
Next, I want to talk about the successful roadmap to learning about Linux. The first phase is actually curious, I’m not sure how many of you guys here actually came to this session because you’re curious about what’s Linux and maybe what Linux can do to you. For example curious about hacking, curious about UNIX, UNIX operating system. First of all, you need to be curious you need to know how great is Linux. So what, who, when, where, and also you must have something called the end game in mind. The end game here means that you have to know what is eventually what you want to build. What other things or maybe what are the projects that you want to build and in mind? Let me just quote you one simple example, so for most of the users or participants here I can suggest you a very simple project which is called your home server. For me this is actually my learning journey if I want to learn Linux, I need to know what can I build eventually at home so that can have some Linux machine to play around with so I built a home server. What do you want to run with your home server? very simple file sharing, this is the first thing, you want to be able to have a file sharing platform to be able to share files among your family members, build a file server to store your photos and your videos the one that you shoot from your digital camera your smartphones and throughout the years. I think most of us here owns smartphones for more than 10 years so can you imagine how many photos and videos you have taken so why don’t you hold you you store you save all the photos on your home server rather than store them in the cloud because when you store in the cloud those folks they will charge you forever and you have to pay until you die. Why don’t you start a simple project and gain a project in your mind? The reason I mentioned this is if you know how to build a home server at home, you know how to build a server for a company. So the building process is almost the same.
The second part is to learn, first of all, you must have an end game in mind and then you start learning. How we can go through the learning process and then once you start learning, practice, practice, and practice this is something where you cannot avoid because Linux is not like any other software in the industry to build you need, to test it and after that destroy and then rebuild again. I cannot recount how many Linux machines I built in the past or maybe a couple of thousands of Linux installations you install and then destroy test. I’m still doing this today back in those days when I started my Linux journey. I’m not sure how many of you guys know something called the floppy disk. The first distribution that I was using during those days was called there’s a district called Slackware Linux. The one thing I like about Slackware Linux here is that you can download it in discord format because it’s not like today you can download the ISO file and just install it. You have to download it in the discord so I need to buy a whole stack of discords the 3.5. So now this is actually what I’ve just pitched earlier, the end game is actually related to this every day. For example, if you build a Linux file server at home, you will have a Linux machine all the time with you. For example today you might be building a simple file server, and tomorrow you might be building a file server, building a print server which in fact I did to my printer as well. The USB printer I convert the USB printer to become a file-sharing of printer sharing. You can also build a mini web server for your home so you can have your own WordPress, learn how to register a domain name and you can type the domain name into your home server. The next point here is that we should be able to become scaleless. Scalars mean that you are not afraid of Linux. How do you know that you achieve that scalelessness? The answer is very simple, next time when you do a search in google for any error messages and at many times you come to see those suggestions like commands that you can use to overcome your problem. so many times when you see those commands it’s actually very scary. The moment you reach the scale scaleless stage is the moment where you can consider yourself somebody who actually understands Linux.
Let me introduce the first tools it’s called the mobaXterm. This is actually how it looks like a mobaXterm. It’s freeware this is not open source where for information so this is one of the very popular tools among Linux administrators because they can actually use these tools to perform ssh sessions and also they can use it for also the graphical stuff. mobaXterm can be used for multi-purpose, you can use an RDP session, connect an RDP session and etc. Let me just show you a very brief uh demonstration. I do have a mobaXterm installed on my machine for windows software and from the mobaXterm I can enter into my home server. For example, this is a home server and I can also run a graphical software with mobaXterm so mobaXterm is not only like just to run SSH commands which is like a putty or puppy. I can actually run graphical software so the vert manager is one example of graphical software. This graphical software supposedly needs to run this software within the machine itself within my Linux box itself if want to run any graphical software but with mobaXterm i can bring the graphical interface to my windows screen so this is just one simple. For example, one of the main reasons why I use mobaXterm, it’s not only for SSH and it’s also for the graphical interface as well.
Let’s talk about the second tool, it’s called putty and pageant. I think a lot of people here know what is putty or pageant but together with a pageant piston, you can actually make your life a lot easier especially when you try to troubleshoot when you’re trying to manage multiple windows Linux sessions so let me just show you a simple example uh you if you want to run the putty with a pageant. An example of putty I think everyone knows this is a party and every time when you enter an IP address 1916 100 100 so you have to sign in with your name and the password. With a pageant, you can skip this process. Let me show you this is the pageant and these are all the keys let me remove all my keys and show you guys from the beginning. I can remove all the keys. Once I remove all the keys you will see something very different. Let me just duplicate this session. When I try to log in with my username and this time it’s prompting me for the password. Get to learn how to use this pageant so that you can have passwordless login and the secure way not only passwordless but also secure way. This will help you to manage multiple Linux machines the easy way.
The third one is one of my favorites. It’s called putty and tunneling. This is actually I’m not sure how many of you guys knew this feature. This is a tunneling feature where you can have a very interesting session especially when you want to do a lot of experiments, test the browser, test the web server, and also test those applications which have a unique port number. So usually those port numbers are something that you need to open up from the internet so you can use SSH tunneling technique to easily open up the software. I will show you guys later in one of the demos shortly.
Finally, the important tool that you must have if you want to embark on this journey to learn Linux is the VirtualBox. Why I mentioned VirtualBox here because VirtualBox is one of the great virtualization tools where it’s actually free and if I’m not mistaken this is also open source as well so here’s the example I can spin up the VirtualBox together with my rocky Linux. So Rocket Linux can actually run Linux without installing or formatting my windows machine. This is the best way to learn any Linux or maybe any other operating system besides your window. In fact, if you want to learn windows as well, VirtualBox is also one of the great tools that you can use to install your other windows. For example, you want to learn windows server and stuff like that so VirtualBox is a must. Here’s the example I’m running rocket Linux on top of my windows machine so this is actually without the need to have another machine to be installed just on Linux and to mess up with your operating system.
By the way, for those who do not know what’s Rocket Linux just a quick introduction Rocket Linux is the replacement for sent OS Linux for your information. If you want to find out more, you can do a google search for Rocket Linux and it’s a replacement for send OS Linux.
Let’s talk about sharing number two. Sharing number two here are the command line tips. Here I quoted some examples of command line tips and let me just do a quick demonstration. First, let me use my pageant to add the key and I’m gonna add my private key here and with this private key. I just need to enter my password for my private key just for one time. After that whichever session I launch here with my username, I do not need to re-enter any password because I’m using a passwordless login. Let me just give you some examples of command lines. This is actually how you learn common life. For example, the first common line here is called the history command. it’s not the high storage it’s the history command. The history command is a very useful command so if you just type history and the system will show you the past such as two thousand or maybe three thousand commands that you typed before. Let’s say for example if I want to repeat the command in line for line 1952 assume that this is a very long command and I just want to repeat this command we don’t need to retype everything. So what I can do here is I can type this special symbol called the exclamation mark followed by 1957. This is actually to repeat those command which is located in line number 1009 so this tool works hand in hand. So you have a history command and you have the power of the excellent exclamation so you can actually repeat. For example, if you are doing some scripting and want to repeat this script, this is what I would do. I would just to just put a simple exclamation mark followed by the numbers. The third tip here is the control r. This is called the reverse search in the history command line reverse search. So if you hit ctrl r on your command line prompt. Now you can actually type those commands that you previously ran before. For example, if I want to check out bim so this is example bim so this is you can actually repeat by pressing ctrl r again. This is actually just to repeat the search from the history V I M. So if you want to cancel the search you can hit ctrl c just like that so this is something very useful. I use it all the time an alternate dot is also my favorite. For example, if I edit this file, for example, bim find edit find.txt, and after finishing or maybe if I do a cat right so I went onto VRM and followed a command called cat and I want to repeat the same file name which I’m lazy to type the file name. So what I can do here is to use an alternate dot. You see an alternate dot so this is to repeat the last argument. If you use the arrow key scrolling up arrow key this is to repeat the entire command line. This is the repeat entire command line so you use the alternate dot to repeat just the last portion which is the last parameter. So this is the alternate dot. The next one is also my favorite called the screen command. Let me show you what is screen command. For your information screen command is not a default command for most Linux machines, you need probably have to install this screen to install the screen. You can use the ubuntu, apt installed screen and if you are using a with a send os box set os box then you can use yum to install this install screen.
So I’ve already installed the screen. Let me show you the s c r e n screen then I type a command called top. The top is to run software where you can look at the status of your CPU, memory and etc. For example, if I want to just get out of the session and I want to resume back. Once you enter screen, you can hit ctrl-a and d. D stands for detach so you can see that I’m actually detaching myself from that session and I’m going to launch a different section or maybe I can just exit from this session get out of the session and I can go back home from the office a drive back. Once I reach home I can type screen minus r. R stands for resume right, so I want to resume the session and it’s asking me which session you would like to resume. An example I want to resume the session which is one two-something and I’m going to hit enter resume. How cool is this as this is actually very useful if you are doing the compilation? If you are compiling something or maybe you have something that you want to a command that you want to run for the long term. Maybe for some time and you just want to quit the session. So you want to quit ssh you want to go somewhere else and you want to be able to resume from home or maybe from some other place. It’s called a screen. This is a screen as I mentioned before you have to install it.
The next one is vim. This is a comparison between vi and bim. For example, let me show you a simple example. What is vi? Vi is a notepad as you know vi is a dot pad it’s just like our windows we have something called a notepad. It’s a place where you type tags messages and things. So exactly like this one here but accept vi is something where you need to learn how to use especially on your journey to limit because in Linux machine there are so many files that you need to edit using text editor so use vi. There are a lot of people who will suggest that you can use nano and you can use some other software but to me, I would say a vi is a must because you do not need to install any additional software. Every Linux comes with vi by default. You can use the hl jk command keys for navigation. You can use doing here is JJJ, KKK is to go up, LL goes right, HH is to go left. There’s a left and the right key and then there’s an up and the down key so you can use it. The reason why you want to use this is that you do not need to move your hands and go to the cursor area to do navigation and to come back to the abcd section. Once you have familiar with bi, you can do lots of things very quickly. Let me show you the difference between vi and vim. This is the time when I’m using an alternate dot. I’m not sure maybe I saw that so now I change vi bi to bim and use bim while dot and so this is the difference. Vim you can see colors instead of black and white. Vi will only show you black and white so vim can recognize the syntax of the file. This is the example shell file and we call it the best shell so it shows you different colors to represent the different syntax. So to install vim, the first thing you do is to install vim. The installation is super easy just yum install vim which I’ve already installed so there’s nothing different here right now.
Finally, the last command that I want to introduce is called the Alias or Elias. For example, you can do the alias command enter and you can see there are a lot of commands that can be represented by Alice’s. For example, If I often type commands like this, for example, ls minus TRL. I think maybe what most of you guys know was ls TRL. TRL stands for time, I want to sort the file, by time order, time sort, by time look at the time here and I want to sort in the reverse order so reverse order means that the latest file at the latest time of the file will be at the bottom. I want to have for long listing so without the l it will show me just the file name without the details. T stands for sort by time uh by default it will sort by name in alphabetical order. This is an example of ls minus tr DRL so instead of typing this every time I can use the alias to have an alternative. For example LSR, lists reverse and for also can use a command like this. I’m creating an alias myself LSR to represent the previous command so this is the alias command. Once I enter an alias I can use it as an outcome just like that.
Third sharing point and also I’ve got the last final. The third point here is the application so Linux has a bundle of alternative applications. Let me just give you guys a few examples, for example in terms of application office application, we have something called the library office. So for those who have not heard about the libre office let me just show you the website libre office. If you go to the image and this is actually how it looks like so you have a complete office suite. Open office is also another alternative and etcetera so there are a lot of alternatives in the industry, another alternative is photoshop. You guys are going to be surprised there is this software called gimp which is actually the alternative to photoshop where you can produce stunning images. You know for use by using the open source software and game itself. Do have a version for windows as well you don’t necessarily have to run Unix Linux as your os you can also run games for windows. This is one example and we also have something called scape ink scape. Inscape is a photoshop illustrator alternative where you can use school software like this to build a drawing we call it the vector image this is not the raster to draw very cool icons right uh and animation and stuff like that. This is actually some alternative so my point here is that there are bundles of alternative software for servers. You can use a docker to spin up any application if you want to test out any application any software you can use docker. Let me just show you an example of the dockers that I have at the moment. For example, I have something called the Grafana. I don’t have time to install the Grafana from scratch. So with a docker command, I can do something like this. For example, docker starts a simple web server like Nginx docker, run Nginx, so this is how fast to install to run the application in Linux, especially on the server application. You can just type docker and run Nginx and the system will now start downloading the software and to install it. You can see that “hey it’s running my docker” is actually running. My point here is that to run an application uh you can do it within seconds. For example, 99 colons 80.
Let me just give you one simple example I’m configuring this port 99 to map with port 80 and to start my Nginx. I want to demonstrate and show you guys how I can use tunneling techniques. The tunneling technology to map the IP. Maybe this is too overwhelming for some of you guys but this is actually the main point. I can actually configure a port which is a 19199 to map to this part 99 and this 99 part is to map to port 80. Let me just connect to the browser and I’m going to use localhost 199. It says “welcome to Nginx”. This is actually a double mapping from 199 I mapped to my Linux box 99 port 99 back to port uh port 80 which is the back end port okay which is connected to the Nginx so this is a very simple example I can test any application within seconds and you can do it easily.
Open source first then proprietary now once you learn Linux, especially for the organization for most of the enterprise users. You will start to think of open source first then proprietary. Let me just give you one example NMS network monitoring system. Usually, when we think about a network monitoring system we will just go to google and search for any windows based application any free software, or any backup software but once you learn Linux you would change your mindset. You would like it since I knew there is so many application in Linux which is offered for free. I can test the software, and run it for free so why don’t I google for open-source NMS or open-source backup software? Open-source enterprise backup software, open-source enterprise, and NMS solutions or open source whatever so you will start to think open source than proprietary. This is actually what I noticed a huge change in my life where I do not need to depend on this commercial software.
These are some of my suggestions, you can test out a net cloud. What is the net cloud? Net cloud is to build your own dropbox server but for free. You can test out samba. This is the one that I mentioned from the beginning, you can easily build a file server at home. If you know how to build a file server at home, you know how to build a file server for your organization, and the best part as I mentioned before license free. There’s no need to concern about the cal license for windows. There’s no license at all, you can learn how to set up a cup server. This is the print server, remember I mentioned earlier whatever you learn how to build at home, you can deploy it in your organization. Soft eater, the VPN server is my favorite VPN server, this is a fantastic VPN server. I think one day I would create one session just to share about Softether. It’s one of my favorite topics. Iptables / endian firewall, you can have a complete very powerful firewall for free open source. Proxmox is a vCenter + ESXi + vSan so how cool is it that you can have your own virtualization environment absolutely free by just learning how to install Proxmox?
Let’s talk about point number four uh this is the most important now the reason that drives me to like Linux to love Linux and even to change my name to become Linus is because of the spirit. I love the spirit of open source, the sharing, and the concept you know people contribute to the community. so this is actually the main reason that drives me why I’m still using Linux today I never quit. So this is point number one, point number two here to spread Linux. Once you learn Linux naturally you would want to share with the surrounding people, especially the tech guys. As a trainer, I always talk to my students and I constantly try to brainwash them to enter the Linux area.
Next, involve it. Involvement means you download the software use the software participate in the community and give some comments to share some ideas such as what can you learn, to build this, and things like that.
Finally, contribute all right so because most of the developers for open source developers for zero income or maybe they don’t charge anything from this. So they will always ask for like sponsor them some beer or maybe they ask for a cup of coffee so you can actually donate them by just contributing them from free coffee. This is actually point number four and I think that this is actually one of the points that are very powerful. So without all this, you won’t get to see Linux today.
The final thought is the learning process. How do you get yourself a kickstart you want to learn Linux so the first suggestion here is youtube. Earlier I mentioned the VirtualBox thing if you want to learn how to install Linux using the VirtualBox there are plenty of youtube tutorials so I don’t think I need to have another youtube session just to show you guys how to install a Linux on a VirtualBox. You can find this very easily on youtube. The next point here is self-study reading books. This is actually the method that I was using back in many years ago. More than 20 years ago self-study I bought lots of books, especially on Linux titles and I also love magazines. Linux magazine is one of my favorite okay self-study books training learning from experts. Join the training class, online learning courses, and offline learning classes. This is actually one of the fastest ways for you to kick-start your Linux journey.
The final part is the join the interest group. There are many interest groups in your own community so if you’re staying in Manila, Jakarta, Kuala Lumpur, Penang, or Singapore city there are many interest groups you can go to the website and search for for example you can go to meetup.com you can search for a Linux interest group and there are many people there are willing to share ideas. That’s actually how I met up with some of my friends I think we call it a red hat meet-up. I’m combining my soft eater together with my next cloud at home okay so this is the example of the soft eater, don’t be mistaken by this name twomail.softheater.net is nothing to do with the VPN server. One of the great things about the software is that software offers free dynamic DNS names. This is one of the ones that I registered for myself it’s called the tumor. I use this to host my website for free and this is actually the soft eater for some of the photos I’ve taken I’m also a big fan of snap seed. For those who have not used this software before this is a mobile app snap seed. I use this to modify my photos to make them look cooler and brighter. This thing is actually the next cloud. For information next cloud so exactly the same as how you get your G drive and one drive and etcetera.