Kali Linux Terminal Shortcuts

A free video tutorial from Hackers Academy - Online Ethical Hacking Tutorials
Rating: 4.5 out of 5Instructor rating
2 courses
64,524 students
Kali Linux Terminal Shortcuts

Learn more from the full course

Kali Linux Tutorial For Beginners

#1 Ranking Kali Linux Tutorial! Learn from the pros how to use Kali Linux easily and quickly.

07:36:01 of on-demand video • Updated May 2022

Perform basic to advanced tasks in Kali Linux
Hack your way through multiple customized targets
Learn how the good guys hack and how the bad guys hack (and get your hands on the credit cards!)
Understand how native Linux commands can be used by hackers
Build up a Linux target from scratch to hack with Kali Linux
A lot more!
English [CC]
Instructor: Let's have a look at some useful tips and tricks and shortcuts to when it comes to the terminal. One of the most common most useful signals that you can send to your terminal is the kill command. Sometimes you'll be running a process or a program that you want to interrupt or you want to kill. The way to do that is by using the Control C. I'll demonstrate that using the ping command. On windows, if you remember when we did the ping command it stops by itself. It issues four ping packets and then it automatically stops. And Linux if I do ping hackersacademy.com it will continue pinging until I stop it myself. It wouldn't stop automatically. The way to do that is by doing Control C. Control C is the kill command or the kill signal that I sent to my journal to tell it to stock or kill a program that's running. Another option is to do the Control Z. So if I run the ping command again and this time I don't want to kill the program I just want to put it in the background because if you look at my terminal right now, the ping is hogging my terminal. I can't type anything. I can't continue work. If I want my terminal back but I don't want to kill the ping command. I can put it in the background by doing Control Z and notice that now it says it's stopped. So its been suspended, but its not been killed. If you look at the left side, there's a number here. This is the number of the program or the job that's been suspended and put in the background. And this is useful if I want to bring it back to the foreground, I can do FG or foreground and the number of the job that I put in the background. And look at that, it brings it back to the foreground and it continues the process. Now, if I want to kill that, what do I do? Control C. Okay, now I have a lot of output and mess on my screen. I wanna clear it up. The way to do that is by issuing the clear command and this clears up my screen. If I want to exit my terminal, I do exit. I'm not gonna do that now because I'm still working on it. Here are some other useful tips. The Tab key is used for auto completion in Linux. What this means is that if I start typing a command, instead of me typing the whole thing, I can just hit the Tab key and it will auto-complete it for me. Now, the thing you need to be careful with is that sometimes there are multiple options to one command. So for example, if I'm trying to do trace route and I type the Tab key once, nothing happens I'll have to type it twice. Tab, tab. And notice what happens here, I get multiple options and they all start with trace. This is why Linux wasn't able to auto-complete it for me because I didn't know which one I wanted to choose. So I'll have to do a little bit more completion myself. I'll put the R and I'll try again one tab and it auto-completes it. That recognizes that this is what I want. Now the tab command is useful not only for executing commands, but for browsing directories. It saves me a lot of typing. So let's say for example, I wanna work on a file in an UNM map folder under my documents folder, under my root folder. And to do that, I wanna do CD, don't worry about what CD means. We'll learn that in a moment. But instead of typing root, I'll do r o tab. Instead of typing documents, I do d o c tab. Instead of writing N map, I do NM tab. See how easy it is. Instead of typing all of that I'm going to delete that for now. 'Cause we don't need that. Here are some other tips for you. To scroll up and down the screen. Instead of using the mouse if I don't have the graphical user interface and I don't have the mouse option I can do shift page up and shift page down. If I want to repeat previous commands, instead of typing the whole thing again, I can use the arrow keys, I can do arrow up or arrow down. I can also look at my entire command history by issuing the history command. Let's say I want to search my command history. What do I do? I do Control R and I type whatever I'm looking for. Let's say I'm looking for NMAP NMA, and notice how the output starts changing because it's trying to find the keyword I'm looking for. And here we go, I found one with NMAP. That was one of the commands that I typed earlier on. And this by the way is a command that you'd be learning towards the end of the course. Now, if I hit enter, it will execute a command for me, it says no follow directory, 'cause I'm working in different directory, so don't worry about that but, let's do another one. I'll do Control R. And let's say, for example, I'm looking for the ping command. Look at that PI and it automatically finds the ping command for me. If I do enter, it executes the command for me. I'll do Control C to kill it. Let's say, for example, I wanna change the ping command to trace route. So instead of going back one letter at a time, I can do Control A to move to the beginning of the cursor. And now I can change the ping command to trace route. If, for example, instead of .com, I wanna change it to .org, I can move to the end of the cursor using Control E. Another option I can use to delete the whole thing which is the same as the cut command, is the Control K. Now, obviously for that to work, I need to be at the beginning of the cursor which is Control A, and then the Control K will cut or delete the whole line. This is more useful when I'm dealing with text editing but it still could be used on the terminal if I wanna paste it back. I use the Control Y. Y stands for yank. And if I wanna clear my screen, I do Control L and that clears up my screen. Great, experiment with those for a while. Try them out for yourself and then we can move on to the next section.