← Course overviewFree lesson 1 of 3 · lesson 1 of 62Next lesson →

Unlock all 62 lessons of C Programming for Telecom Engineers and C++ OverviewFull course ₹40,000 · paid

Price & syllabus
Free lesson · 27 min · no payment

Linux Basics, Kernel Role and Everyday Shell Commands

A free lesson from Skill-Lync's C Programming for Telecom Engineers and C++ Overview course, on Grow by Skill-Lync · Last updated 16 Nov 2026 · Session: “Linux Basics and VIM Editor”

What will you learn in this free C Programming for Telecom Engineers and C++ Overview lesson?

The instructor introduces Linux as an open-source operating system, contrasts its file tree with Windows drives, and explains the kernel's role between applications and hardware. Most of the session is a live demo of commands such as ls, pwd, mkdir, cp, mv, tar, find, grep, head and top in an Ubuntu terminal.

  • Linux file hierarchy versus Windows drives
  • What the Linux kernel does
  • Creating, copying, moving and removing files
  • Searching with find and grep

What comes after lesson 1?

The next free lesson is lesson 2, “Process Kill, Ping, Ubuntu on Windows, VIM and GCC Basics” (28 min). Later in Skill-Lync's C Programming for Telecom Engineers and C++ Overview course (paid): lesson 4, Understanding Variable Storage Classes in C; lesson 5, C Programming Basics Part 2; lesson 6, Understanding while and do-while loops. The full course has 62 lessons (28 h 29 min of video); see the course overview or its price and syllabus.

Lesson transcript

Machine transcript of the lesson audio (lightly cleaned). Technical terms may contain errors; the video is the reference.

Hello everyone and welcome back to LTE protocol stack development session and this is the very first session of the C portion. So today we'll be discussing about the C portion and today's topic is Linux basics and VI editor. These are the table of contents. First topic we'll be discussing today is Linux basics. As part of this we'll discuss about Linux introduction. What is Linux? What is the role of Linux? What all things we can do in Linux? What is a Linux kernel? What is the importance of kernel? What is the use of kernel in a Linux operating system?

Then we'll see that few Linux basic commands which we're going to use in our daily programming or daily accessing or the daily use of Linux. Then we'll discuss about download and install Linux and Windows. So Linux is an altogether complete operating system. So if you have to install that operating system then your laptop or PC has to be dual boot. So dual boot means whenever you have to switch from Windows to Linux or Linux to Windows you have to reboot your machine and at one time you can use just one operating system.

But Windows provides one application. So Linux application different variants of Linux like Ubuntu, Red Hat is provided by Windows which you can directly install as an application and you can use it even in the Windows. Windows. If you are accessing Windows you are currently on the Windows operating system. At the same time you can use the Linux operating system as well in your PC, the same PC. We'll see it today that how we can do it and also we'll use it here along with this PPT's discussion.

Then next is VI editor. VI editor will see what is VI editor and what is VIM editor. VIM editor is an advanced version of VI which we're going to use throughout. We'll see the VIM commands, how we can use, how we can edit a code, what all important commands we have to using for saving the files, for putting the files, for editing the files. Then we'll write one C code, a sample C code using VIM editor and we'll also execute it using GCC compiler. Then at the end of the session we'll be having a summary session where we'll discuss about all the things whatever we'll be discussing today as part of our session.

These are the learning objectives. So the learning objectives are basically to understand the basics of Linux including its kernel and basics command, to know how one can download and install Linux in Windows operating system itself, to learn the basics of VI editor, to become familiar with GCC and to understand how to execute a C program using GCC. GCC is a compiler. So let's start with our first topic from today's table of contents that is Linux basics. Linux introduction. So what is Linux? Linux is basically an operating system which is open source. Open source means it is available free.

You don't have to license, you don't have to buy any license or you don't have to pay anything to use this operating system to take it. It is available online. You can simply download it. The source is also open. You can download it and you can simply use it. So a few major differences between Microsoft Windows and Linux system. In Windows, files are stored in folders on different data drives. Data drives like C, D, E kind of drives. But in Linux, files are ordered in a tree structure, starting with the root directory.

So here you can see this is a root directory. Inside that we have different directories. Directories means folders. Bin, etc, temp, dev, user. You can have subdirectories as well or you can call it subfolders inside these directories. So this is how the hierarchy of Linux system works. In Linux, everything is a file. It's not like you need to have a setup or exe or something like that. Everything is in the file. The folder itself is also a file in Linux system. Linux file systems are cache sensitive unlike Windows.

So in Windows, if you create the same file name, two different files with the same name, and if you are just changing the case of the name, then your folder will not accept it. It will simply give an error or warning like the file name already exists. You want to rename it, then you can rename it or you can either ignore that and you cannot create it basically. If you ignore that error message, then you cannot create it. But in Linux, what you can do, if you are having the same file name, but only if you are changing the case.

For example, you can see here in sample.txt, S is caps. Rest alphabets are small. Here, all are in caps. So file name is exactly the same. You can see the extension.txt is also the same. But this is permissible in Linux. You can do it. You can create in the same folder. Linux kernel. So kernel is the most important part of Linux operating system. What it does, it basically connects and interacts the system hardware with the application software. So application software is the user space area where you write the code, you execute the code, you download some files, you make videos, you make music and everything that is in application area.

So, you know, to take the system hardware's interaction, like if you have to execute your application, then you have to execute using CPU, you will be allocating some memory, you will be using some devices. So this kernel basically provides you all the features. So it interacts between application and the hardware. These are the some functionalities of Linux kernel. It manages the memory and keeps track of how much memory is used to store what and where. It also manages the various processes and determines which process can use the CPU, when and for how long.

So basically the scheduling of the processes is done by the kernel receives requests for service from the processes through system calls. So let's say in the C programming, if you are writing a C code in your application, in the user space, and you have to access the hardware like read, write operation you have to do, then you simply make a system call called read or write. And that system call is input to the kernel and kernel will provide you the access of the system through those calls.

So these are the Linux basics commands. So basic commands like as we discussed that these are the commands we'll be using very frequently when you have to do even a simple C code. You have to write a simple C code or you have to execute it and you have to make a folder or file, delete. Then you're going to use all these commands. Okay. So first command is LS. LS is basically it's the full form of LS is list. So it will list down all the, you know, files and folders inside a directory.

Okay. So we'll run all these commands and we'll see one by one what all functionalities these commands are having. Okay. So first is LS. So as discussed, if you type simply here LS. Okay. So this directory doesn't have anything. That's the reason it is not showing anything. I'll simply change the directory. I'll do LS. So you can see here it is showing all the directories. The blue ones are directories and these are the file names. So if you simply type LS, it will show, it will list all the files and directory inside that particular folder.

Next is PWD. PWD is basically tell you the present working directory. So PWD is tell you in which directory you are in currently. Okay. PWD. See. So it will show you the current working directory home skill. It means I am inside the home and inside home I am inside skill directory. Okay. Next is MKDIR. MKDIR is make directory. So MKDIR and the folder name. If you have to create a new directory, then you can type the command MKDIR and you can provide a folder name. For example, let me create a new directory MKDIR.

Let me first do LS. If you do LS, see, these are the files and folders. MKDIR session 1. Now, if you do LS, you can see here session 1 has been created. Okay. Next is Siri folder name. Now, if I have to go inside session folder, how can we go? Because currently we are not in the session folder. So let's go inside that folder, particular folder. Okay. So we can type Siri and the folder name is session 1. Now, if you type here PWD, see, home skill session 1.

Next is Siri hyphen. Siri hyphen is basically it will take back to the old directory from where you have come in. So we were inside Homeskill, right? But current directory is Homeskill session. So let me do CD- and now let me type PWD. We are inside Homeskill. Again, if I do CD-, then it will take you to Homeskill session 1 because from session 1, we came out of that session 1 and we came inside Homeskill. That's the reason the previous directory is session 1. It will take you back over there.

Next is touch filename. Touch, it will create an empty file. Okay? It will create an empty file and simply you can give a file name to it. Okay? Touch test1.txt. Now let me do ls. You can see here test1.txt has been created but the file content is there is nothing inside the file. It's just an empty file. Okay? So ls-a, ls-ltr. So ls-a is basically extension of ls and ls-ltr is also extension of ls. So ls-a, what it does, it will show you all the files inside the directory.

I mean, all the files, it will show the hidden files as well. Okay? The system files which are hidden, that also it will show. And ls-ltr, it will show the listing in detail. Okay? So let's see how this file names, I mean, how the differences are there between this ls, ls-a and ls-ltr. So if you see ls, it will list all the files. Now let me do ls-a. You can see few more files. Okay? These are the hidden files. Then let me do ls-ltr. See, ls-ltr will show you the file name, the timestamp, the user, the permission and the size of the files and the folders. Okay?

So let me go back to the session 1. Next is cat filename. Okay? And then ctrl plus d to exit. So what it does, it will create a file, new file. Okay? And it will allow you to write something. And when you press ctrl plus d, you will just exit from there and the file will be written. Test2.txt, enter. Now you can write, this is my dummy file. It has skill link content. Now I have to exit from this file. Okay? Simply, I will press ctrl plus d. It will exit. Now if I do ls, you can see here test2.txt has been created.

Okay? Cat filename. Cat filename is basically, it will open the file in read mode. So you can see the content of that file. So let's do the cat for both the files. Okay? So cat test1.txt, there is nothing. Because this we had created using touch. So there was, the touch was to, you know, create a file with empty content. Then let me do cat for test2.txt. You can see, this is what we had written in that file, in the another file. This is my dummy file. It has skill link content. Okay?

Next is rm-f and rm-rf. So rm is basically to remove. So rm-f is just remove the file. But rm-rf will remove files and the folders. Okay? So let me create some dummy files and folders. And let me try to remove it. Okay? Using rm-f and rm-rf. So let me create some folder. So let me create some folder. So let me create some folder. So let me create some empty files. touch. Touch. T1, t2, t3, t4. Now if you do list. These many files are there. Now let me do rm-rf. Let's say t2.

Now if you do ls. See, t2 has gone. It has been removed. Now let me remove f2 with the same command. rm-rm-rf f2. See here. The error is cannot remove f2. It is a directory. So for the directory, you have to type rm-rf f2. That's it. It has removed f2. Okay? Next commands are cp, mv. So cp is basically copy and mv is move. Okay? So let's say inside this folder or let me come out of this folder ls. We have created test2.txt. So what I can do?

I will simply create a copy of it. Test2.txt and copy.txt. So this is the source. I am creating a copy of this. So let's say you have to copy from here to some other folder. That also we can do using the cp command. Okay? So let me just try it. Okay? Now see it has created one more file copy.txt. Let me do cat copy.txt. You can see the same thing has been created. Now let me go back one folder and let me see. Here there is no copy.txt. Let me again go back inside that folder and let me create test2.txt copy of some another folder.

cp test2.txt and slash home slash skill inside the skill folder. Okay? Enter. Now if I go back inside the skill folder and do ls. You can see here test2.txt has been created. We copied test2.txt inside home skill. So test2 has been copied over here. Now let me again go back. Now what I can do? I will use the mv command. Move command. It's like ctrl c and ctrl v was cp. And ctrl x and ctrl v from windows is mv. mv is move. It's a cut basically. Okay?

So if I move here test2.txt to copy2.txt. Now if you see test2 is gone and copy2 has been created. Okay? So this is how it works. Next is man. Man is basically if you have to inquire about any of the command, you can use this command. Man. So it will show you the man page which are available in the Linux. For example, let's say I have to do man for ls. Okay? I have to see help section for ls. Then what we can do? Man ls. See? It has opened the man file. So it is showing that ls.

It is used for list directory contents. These are the descriptions. These are the different options. Okay? So for any command which is available in Linux, you can do man. Okay? Then q. If you press q, it will quit. So let's say man cp. So you can cp, copy files and directories. And these are the options. Okay? Quit. Next is df-m and du-h. So df-h, it will show you the system memory. How many memories are left? How many memories are being used? And du-h is used for a particular folder.

So let me run this command df-m. See? You can see here the different mounted devices it is showing. Okay? And it is showing that available memories, used memories and percentage of the memory which has been used. Okay? Next is du-h. Du-h. See? If you type here, it will show you the directory voice. Okay? So f1, f2, whatever we had created is showing 0, 0. There is a c directory which is showing for tk. Okay? Then tar. Tar-cvzf destination and the source. So let's say you have to create a tar.

I mean you have to do a tar for any of the folder. Then this is the command. So this is to tar and this is to untar. Okay? We will try to run these two commands. Let's say you have to tar this folder session 1. So what you can type? Tar-cvzf session, any name you can give, .tar.gz and then session 1. Okay? See? This is some error. Why? Because we have given a wrong command. Okay? It has to be cvzf. Okay? So the tar has been created.

If you do ls-ltr, you can see here. Session.tar.gz. Now, let me copy it in some other folder. Let me copy it inside session 1. Or let me move it. MV session.tar.gz inside session 1. Let me go inside this folder. And let me do ls. So we have moved that file name here. And now if I have to untar it. Okay? Then the command is star-xvzf. See? It has untar. So you can see before untaring, there was no session folder. And now if you do ls, then there is a session 1 folder has been created.

I mean, it has basically extracted from this tar file. Similarly, the zip and unzip also works. Okay? Z. Z. Fiberkata.gz.gz.gz.gz.gz.gz.gz.gz.gz . You can provide a filename.zip and the source. And for the unzip, you have to provide the command unzip and the filename.zip here. Then it will simply unzip. unam-a and unam-r. So unam-a basically it will show you the system information, the version of the operating system, the kernel version and all. And unam-r will simply show you the kernel version. So let's see unam-a and unam-r. Okay. You can see here it is showing like Linux, desktop, this Microsoft version and this is the operating system, x86-64.

Okay. GNU, Linux. If I do unam-r, then this is the kernel version it is showing. Okay. 4.4.019041, Microsoft. Next is find and grep. So let's say you have to find a filename. Okay. So in Windows, what you do? In the search box, you just type the filename. It will, you know, find the filename for you. And grep, what it does, it will just search a string in a file. So if you type this command, grep-inr and the string, it will list you all the files which has this particular string.

So let's try these two commands, find and grep. So first let's see inside the test directory, we have, let's say T3. Okay. Let me grep it. Let me find it. Here, we don't have T3, but we have to find. So I'll type find dot hyphen name T3. Okay. So see, it has found inside session1 test directory T3 and inside test directory also T3. So it is showing at two places because we have created a copy of this test directory. Sorry, this session1 folder while doing this untar.

So T3 copy has been created at two places. Okay. Now let's try the grep command. So as we know that we had created a test2.txt, we had typed something and we had created a copy of it. So we had used a word called skill. So let me grep that word. grep hyphen inr skill dot. Dot is the directory. Dot means the present directory. I mean, start from here. Search all the subfolders. R command, I have R option, I have given to search recursively. Okay. Okay. So here you can see copy1.txt is having this skill.

Copy2.txt also having skill. Copy1 inside session folder, the same file has been copied. Copy1, copy.txt, copy2.txt. These are also having skill skill. Let me search something which is not there. Let me search something like Mars. See, there is no any result because there is no any files which is having Mars. Okay. Let me create one file. Let me create one file. t1.cat t1.txt. Let me write here. Hi, I am on the Mars and control D. Now let me search the same command. Use the same command.

See, now it is searching t1.txt, right? Hi, I am on the Mars with the Mars keyword. Okay. These are few more Linux commands that we will see one by one. So tell hyphen f. Tell hyphen f what it does. It will show the 10 lines from down of a file. So let's say you have a file which has 100 lines. Then it will show the last 10 lines. And similarly, head will show the top of the file, the top 10 of that file name. Okay. So let's just try these two commands.

Tell hyphen f file name and head file name. Let me create a file. vim.r or simply cat slash. This is just a file. I am just trying to do a cat. If you see here, if I did cat, it is showing the complete content of this particular file. So what I am going to do, I will simply do tell hyphen f. Tell hyphen f. Okay. Now you can see only these 10 lines from the last of the file it is showing. Okay. So this is very important.

Some, let's say, if you are running something in the logs, you have to see just the last line so it will basically, you can, you can use this tell hyphen f. It will just show the last 10 lines. Okay. Last 10 lines. And, and this is C, this is still in that mode where it has not come out. So if something is being written, the logs have been written, it will start showing continuously. Okay. Similarly, if I type head to that file, you can see here a 10 lines from the top it is showing.

Okay. Then next is ps-a. ps-a and top. Okay. So ps-a basically shows all the processes. And top is basically, it's like your task manager. It will show the CPU usage, the memory usage for all the processes. Okay. So let us try these two processes, ps-a and top. So see, it is showing all the processes. Let me see with the top. Okay. So you can see here, it is showing all the processes. It is showing percentage CPU, percentage memory, the user. Okay. And the process name. Okay.

If you press Q, you will just come out of it. ps-a,f, grep, process name. So this is the command. So basically ps-a,f, it will list you all the process and a pipe, grep, process name. So let us say you have to search for a particular process. Okay. Let us say I have started Chrome and I have to find out whether Chrome is running or not currently in my system. Okay. So what you can do, you can type ps-a,f, this pipe, grep and here, Chrome. Then it will tell you whether this process is running or not.

Okay. To simulate this, what we'll do, I'll simply run one of the process manually and we'll see whether it is showing using this command or not. Okay. So let me see if I'm having any find dot hyphen name, a dot out any file. Okay. I have one file called a dot out. What I'll do, I'll simply run this file. Or, or let me do one thing. Let me create a process, which should run infinitely. Okay. And then we'll use this command and we'll see whether it works or not.

Okay. So today's session will pause here only because we are running out of time and we'll continue from here only in the next session. Okay. Thank you. Thank you.

Want the rest of C Programming for Telecom Engineers and C++ Overview?

Get the full course syllabus and fees.

The full course is paid (₹40,000). We'll send the syllabus and call you back within one working day.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Full course · paid

Unlock the full C Programming for Telecom Engineers and C++ Overview course

The remaining 59 lessons, mentor-reviewed projects and a certificate come with the paid course (₹40,000). Leave your details: we'll send the syllabus and fees and call you back.

Get the syllabus and fees

A counsellor calls you back within one working day.

By submitting you agree to our Terms and Privacy Policy.

Grow by Skill-Lync · free lesson

Start watching

Free, no payment. Leave your details once and every free lesson on Grow plays straight away. A Skill-Lync counsellor may call you about the full C Programming for Telecom Engineers and C++ Overview course.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.