← Previous lessonFree lesson 2 of 3 · lesson 2 of 62Next lesson →

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

Price & syllabus
Free lesson · 28 min · no payment

Process Kill, Ping, Ubuntu on Windows, VIM and GCC Basics

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 Process Management and Networking Commands”

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

The instructor finishes the process commands by finding and killing a runaway a.out process, then shows ping and scp. The lesson walks through installing Ubuntu on Windows via Windows Subsystem for Linux, editing in VIM (insert mode, save and quit, copy and paste, vimdiff), and compiling a hello world C program with gcc.

  • Finding and killing a process with pkill
  • Installing Ubuntu through Windows Subsystem for Linux
  • VIM modes, saving, copy, paste and search
  • Compiling and running C with gcc

What comes after lesson 2?

The next free lesson is lesson 3, “C Variables, Data Types, Memory Layout and Storage Classes” (26 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.

So we'll resume the session from here. We were discussing about ps-eaf grep process name. So what will we do? I'll run a process infinitely and then we'll try to run this command and we'll see whether this process name is actually searching for that process or not. Okay. I have a program which is running. Okay. And I'll open another terminal in the Ubuntu to see whether this process is being searched or not. Okay. ps-eaf-grep a.out. Okay. You can see here this process is running. It is able to find out a.out. If I do top, in the top also you can see this a.out.

It is taking 100% CPU because it has infinite loop. Okay. So keep it running and we'll do the next operations. Next operation is p-kill-9 process name. So this is to stop the process. Let's say you opened any process in any of the terminal. You are not able to find it. But this is how it is taking 100% CPU. Okay. Then this is how you can kill the process. P-kill-name, p-kill-9 and the process name. Okay. Let's try this a.out. Okay. Now let me see the top. You can see the process is gone. It is not showing here. Okay. And also if I do this ps-eaf grep a.out.

Here also you can see that is gone. Okay. This is just the grep command it is showing. So this is not the actual process. Okay. Don't misunderstand this. Next command is ping and scp. So ping, let's say you have to see some machine. You have to check whether a machine is reachable to your PC or not. So how you can do that? So ping and scp command both will try one by one. scp command, you know, two, it is a secure copy command which copies. It is a. Okay. So cp we checked, right?

So cp what it does? It creates a copy. You can copy from one folder to another folder and you can copy in the same folder. You can create a copy with a new name. But scp, if you have to copy from one machine to another machine. So basically to send a file, you use the scp command. So ping and scp command will see 127.0.0.1. So this is the same machine IP. You can see here, I'm able to ping this. Okay. So here the ping request is going.

This is 64 bytes from this machine. The response, it is showing the time, the TTL 128. We saw this TTL at the time of, you know, this TCP header. Okay. And so this is similarly, this is basically ICMP packet. But TTL is applicable here also. And let me ping any IP which is not in my range. Let's say 172.24.34.5. See, it is not able to ping. It is not able to get any reply from that machine because that machine is not connected either to my laptop back to back or it is not on the network.

Okay. Now scp. So, okay. Anyways, my machine is not connected to any of the machines. So I will not be able to show you exact scp, but I can show you the command. This is how the scp works. So let's say I have a file called ss.c and I have to copy it in some other machine. Okay. So scpss.c and then I have to type the username, username, let's say root at the rate, the IP of that machine. For example, 172.24.34.5 and the directory where you want to copy in which directory of the destination machine you have to copy colon slash let's say home slash skill.

Let's say that machine is also having this home skill directory. Then you can basically copy this to that particular machine. Okay. So this is how it works. But if you try to this command as this machine is not reachable, you will not be able to copy this. Okay. Now let's move to the next slide. Download and install Linux in Windows. So the one which I just showed you, the one which I was using, that is the one which is an application, Ubuntu application I have downloaded and I have installed in the Linux.

So I will tell you the same process, how you can do the same thing to install in your particular machine. Okay. So first you have to start this Windows features on or off. So from the start menu, simply type this turn Windows features on or off. You can see this kind of window and click on this. Okay. Alternatively, you can open the control panel. From there also you can open this. Once you open that, select Windows subsystems for Linux. Okay. You can see here Windows subsystems for Linux.

You can click this. Okay. And click OK. So what it will do, it will show you a window which will keep on searching. Okay. And once the search will complete, it takes a couple of minutes around. And then it will ask you to restart the machine. Simply click on restart. So you just restart your machine. Once the system comes up, you again open your start menu and type Microsoft Store and search Ubuntu. In the Microsoft Store, this is how you can search Ubuntu. Okay. In the search box on right top, you can search Ubuntu.

Then you will see like this. Search result. Okay. Click on Ubuntu. It will start downloading and automatically it will install also. Once you download and install, again you go to the start menu, search for this Ubuntu, open that application in administrator mode. It will automatically start the installation for the first time. Whenever you will start Ubuntu, you will see in that window it is still installing. Okay. Once it will install, it will ask you to create a username and the password. So you need to enter one username of your choice.

You can create a password of your choice. You can confirm the password and that's it. Done. You are ready to start. Okay. So you can see a similar window like this. And you can start. You can create directory. You can try whatever commands we discussed. You can try everything here. Next is VI or VIM editor. So what is VI editor? The VI editor is a text editor. In Linux, we saw that using the cat we can do. Right. But let's say I have to reopen that file and I have to, let's say, do some editing.

How can we do? So for that purpose, you can use this particular command VI editor. Okay. It is available in almost all Linux distributions. It works the same across different platforms and distributions. Okay. It is user friendly and most famous Linux editor. These are the features of VI editor. VIM. VIM is the full form of VIM is VI improved. Okay. This VI editor itself, but an improved version is an advanced version of VI, which has several additions. So these are the VIM commands. We'll see each and every command one by one.

So first is VIM and the file name. So let's say you have to create a new file, any C file or anything or any text file. You can type this command. It will create a new file with file name and it will open in a read mode. Okay. So let's try this. VIM, let's say, test4.txt. So it has opened. It's a, you can, you can see it is showing new file, but there is no any content because we have not written anything. It is just a new file.

Next is I, insert. Okay. So if you try to write something in that file, you will not be able to do it. Okay. So you have to bring that file in insert mode. Insert mode means write mode. Then only you will be able to write something. So insert mode, how you can bring? You can simply press I in your keyboard and it will bring you the insert mode. Okay. So let's do that. I'm pressing I. You can see here, test4.txt new file. If I press I, you can see here insert.

Okay. It is insert mode. Now, if you try to type something, you will be able to. Okay. I, this is my first file editing. I am using VIM editor for the first time. Thanks. Okay. Now, you have to save this file. So this copy, cut, paste, search, ignore case, this will, will come to it. Let's us first go to this two commands. Quit and write and quit. Okay. So if you press colon and Q, it will just quit without writing anything. If you press colon WQ, okay, then it will write and quit.

Okay. But if you type here colon, it will type in the file itself. Why? Because you are still in insert mode. To come out of the insert mode, what you can do? You have to press skip. ESC. Okay. Once you press skip, then only you can make these operations. Okay. So let me do that. I pressed skip. Now you can see insert is gone. Now you can see insert mode. It will be up. Okay. Let me do it. So if you type colon, it is coming here. Okay. So if I type W an exclamation, see this file is written. Now if I type again colon Q an exclamation exit. Again, now if you have to see that file, you have to view that file VIM test for dot TXT. You can see the contents, whatever we had written. Okay.

Now again, if let's say you have, I have to edit that file, press I to insert mode. You can see it is in insert mode. Then again, this is the next line. Okay. Now I'm pressing escape. And if I do colon Q and simply press enter, then see no write since last change. Add exclamation to override. So as we have done some modification, then you cannot simply press Q and you can come out. You have to tell that. Okay. Intentionally, I don't want this changes to be there. So what you have to do? You have to press Q colon. Come out.

Now if you open that file. Now if you open that file, see the lines we had added recently is gone because you have just quit without saving. Okay. So now let me do again the same thing. This is my next line. Skip W written. Now if you simply to colon Q, it will exit because the file is already saved. Okay. And you can do both the things like this is again one demo. Press escape. And let's say you have to write and quit. How can you do that? So colon W, W, Q and exclamation. Then it will come out. Now if you open this file test4.txt, you can see both the lines have been successfully written. Okay. Now next thing we discuss. Now next copy, cut and paste inside a file. Okay.

So let me do this. This is my first line editing. Okay. So for the copy, you have to press YY two times. Okay. And then let's say I have to paste at the end, then press P. Okay. So this is my first line editing. You will see here also, here also. So it has done copy and paste. Okay. Now let's say I have to copy multiple lines and paste. Okay. So let's say from here, I have to copy one, two, three, four lines. Okay. Then I have to press four YY and here paste.

This four lines have been pasted. Okay. Now similarly, if I have to do cut and paste multiple lines. Okay. Then what I can do? Let's say from here, one, two, three lines. I have to do cut and paste. So what I'll type three, three, three, four, three lines. Three, D, D. Okay. It has cut. Now you have to paste it somewhere. Let's say at the end, P, paste. So see, it has cut from there. It has pasted here. Okay. Again, to write this, but you have to make sure that this you cannot do in the insert mode. Any ways in insert mode, if you try, if you, you know, press DD or YY, it will be written over here. It will not work as a command. So every time you have to come out of the insert mode after pressing escape, then you can use this command. Okay.

So the file is still not safe. So what I'll do? Colon, W, Q, exclamation, write and exit. So we understood like DD does the cut, P does the paste. 3DD means three lines or 4DD, 5DD, any DD. That main number of lines will be cut and P will be pasted. YY copy and number of lines copy and paste. Search. Search. For the search, you have to type just the slash. Okay. Let's see how we can do it. Let me open the same file. Again, you don't have to go inside insert mode. So remember, to type any command in VIM, you have to quit the insert mode then only. Otherwise, it will be written.

So for example, if I enable insert mode and if I type anything that slash, it will be now written in the file. So you have to come out of the escape. And then if you press slash, you can see the slash came here. If I now search it, editing, enter. See, it has searched the first file, the first thing, right? First occurrence of that particular string. If you press N, it will show the next occurrence. Again, if you press N, it will show the next occurrence.

If you press N, as it is done. Again, it is going back to the first one and here it is coming. Search, hit bottom, continuing at top. Okay. So again, let me search for example, VIM. So search, VIM, enter. So see, it has searched the first VIM, next, second VIM, next. Okay. As there are just two occurrences, it will again go back to the first one. For example, I am searching something which is not there. Enter. Pattern not found. Okay. So this is how you search in a VIM.

Ignore case in search. Set IC. So what set IC does? Okay. I'll show you. So let's say it's a file. Okay. F-I-L-E file. Let me search this with file. See, pattern not found. Why? Because F in caps I have given. So I, as I mentioned you that Linux is case sensitive. So if you are searching F in caps, then you will not be able to file. So in the search, let's say you have to ignore the case. Then what you can do, colon, set IC. IC is for ignore case. Enter. Now you search that. Caps F-I-I-L-E. Now see, it is able to find. Okay.

So the next is VIM diff. VIM diff is basically, it will show you the differences between two files. So the command is VIM diff, file one and file two. And DO is, okay. We'll first create one more file to see the diff. Okay. What I'll do, I'll create a copy of this file. File, file, test, cp, test4.txt to diff, test.txt. So it will create another copy. I'll open diff, test.txt, enter. Then you can see the same file has been created. But what I'll do, I'll simply change few of the lines.

First, I'll change it to second. Editor, I'll change it to, let's say, anything, mars. Now I'll quit. Save and quit. Now, I have to see the difference between this test4 and diff underscore test. So the command is VIM diff test4.txt, diff underscore test.txt. If you enter, you can see the differences. So these are the files, these are the lines, which doesn't have any difference. But here you can see, it is showing the difference. Here it's first, here is the second, here is the editor, and here is the mars.

Okay. So currently, see, I am in this particular file. You can see the my cursor, right? The cursor is here. It is moving. So if you do insert, I, then you should be able to edit this file. Okay. Then see, again, this complete line difference is started showing. Okay. So let's say you have to basically go in that particular file, the right file. Okay. Then how can you do that? So there are three commands. I'll show you. One command is to move from here to there. The cursor will move from this file to left to right and right to left.

Another command is, you know, to take the difference, this difference here or this difference here. Okay. So these three commands, let's go back to the PPT. DO is DO OBTAIN. DP is DO PUT. Okay. And WW is to move from left to right or right to left. So first, let's try WW. It is coming here. But just remember, when pressing WW, you have to press CTRL. CTRL plus WW. Now see, my cursor is here. If I press again, CTRL, WW, see, the cursor came here. Okay. Now, if I have to take this difference here, okay, then what I can do?

So DO OBTAIN. So if you are here, then OBTAIN. You have to take from here, then DO. Now you can see that difference has come here. Okay. The first became second. Now let's say you have to put this difference here. Here, instead of MARS, you have to, you know, put this editor. So you don't have to do it manually. You simply... Type here DP. Okay. So see editor. Here also you can see editor. Here also see editor. Here also you can see second. Here also you can see second. Okay. Now again WQ. If I do WQ and this exclamatory, then it will quit the only file which is under the cursor control. So it will simply quit the left file. But if you press WQA and exclamation, then it will quit all the files. A for all. W for saving. Q for quit. A for all. WK, W, Q and A exclamation. It will quit all the files. Okay. Now if you again do the same WIMDIF as we have taken the differences, both files are same. If you do the same WIMDIF, it will show you nothing. Okay. If you press escape, it will expand. But there is no any difference. Both right and left file are same. Okay.

Now next is C code execution using GCC. So what this GCC does. GCC is a compiler which compiles the code. Okay. So the first thing is installing GCC. Okay. So this is the command. apt-get install GCC. Let me try this command in my editor in my Linux system. Get install GCC. It is showing that GCC already at the newest version. So there is no any upgrade. So 0 upgraded, 0 newly installed. But if you run this first time, then it will find the GCC package. Then it will ask the permission. You have to press Y. Then it will start the installation. Then it will install the GCC and you will be ready to run your first program. Okay.

Writing a C code in WIMDIF. So now as you have understood that how we can create a file, how we can edit a file in WIMDIF, how we can, you know, save, how we can quit, how we can copy, how you can see the differences. The similar way you can use here to write a C code. Okay. So let me write a hello dot C program. Okay. So steps, same steps I'll follow. I'll first try to create a file and we'll try to open that file in read mode.

So VIM hello dot C. It has opened a new file. You can see here. Now I'll press I to insert. Okay. Now it is insert mode. I can type anything. So let me type my first command hash include stdio dot H to main printf hello world slash n. So this is my first program. I have written. I have edited. Okay. Okay. And I now I want to quit. And why first we have to save and we have to quit. So as we know that both the operations saving and quitting can be done together.

So I will just press escape. So it will come out of the insert mode. So I'll press escape. Now you can see insert mode is gone. Then colon WQ and exclamation. If you press enter it will come out. If you just want to see you can simply open VIM hello dot C colon simple quit. Or if you try to do cat also will work. But it will simply open in the read mode. Okay. You cannot edit or you cannot modify this file. Now we have to run this file hello dot C. So how can we run that?

To running this file what we have to do? We have to type gcc hello dot C. Okay. This is the command. Execution of the code using gcc. So if I simply run gcc and the file name if I give. Then what it will do? It has compiled. But if you see it has created a default binary name is a dot out. But let's say if you have to provide a name of your binary that I want a particular name. Then how you can do that? You have to type gcc hyphen o output file name and your dot C file name. So it will create an output file name. I have to run this dot slash and your output file name. Okay. So let's let's try this.

gcc hyphen o my output. My output. And then the file name. File name is hello dot C. Okay. Now if you do ls hyphen ltr. So my output has been created. Okay. Now I have to run that file. So for running dot slash my output. Enter. Now you can see your first program is hello world. Okay. Let me modify that file. Hello dot C. I'll let me add one more line. So what I'll do. I'll do a copy. So I'll press double y y y y and I'll press P. Simply copy this line. Hello world.

And I'll again start the insert mode. I'll type here line 2. Again escape save quit exclamation. Now again I have to run. Right. So okay. So if you press up arrow in your keyboard up arrow will show you the last command. The history basically. Okay. This is how see. All the history it is showing in the up arrow. Down arrow will again come back. So I'm just trying to find out history. So last was vim. Before that it was dot slash my output. Before that it was ls hyphen ltr.

Before that it was gcc hyphen o. This is what I wanted. Again I'll compile this. Compile. Now I'll try to run my output. Now it is printing two lines. Hello world. Hello world. Line 2. Okay. So this is how we can run C program using a GCC. So that's it from today's session. We'll summarize it quickly. So we learned about Linux. Linux basics like introduction of Linux. What is Linux operating system. How it is different from Windows. We learned about kernel. How where the kernel sits. This provide interaction between user and the hardware of the system along with some memory management process control.

Then we understood about Linux basics. Then we understood about Linux basics command like creating directory, copying directory, removing directory, creating a file, writing a file, you know, creating tar, zip, scp, ping. Then we saw like downloading and installing Linux or Windows. How we can download from the Microsoft store and how we can install Linux quickly to work parallel in Windows. Then we touched upon VI editor and we discussed about VIM editor. How we can, you know, start using VIM editor. How we can write a code, how we can write a code, how we can write a code, how we can edit, how we can quit, how we can save the file, how we can compare two files, how we can, you know, see the, check the differences, how we can copy a line, how we can copy multiple lines, how we can, you know, paste, how we can cut and multiple cut and paste using the YY and DD command.

Then we edited the first C program in the GCC in the VIM editor. We saved it and then we learned how we can install GCC and we ran that same program in GCC compiler. We just compiled that program and we ran it and we printed hello world and hello world line two. Okay. So that is it from today's session. Thank you. Thank you so much for joining. 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.