Linux Essentials with Kali Linux | Day #1

Day #1 -> Warming up with basic terminal commands and shortcuts

Meraj al Maksud
3 min readJun 13, 2020

The terminal is the most crucial part of a Linux system. It’s like the command prompt on a Windows system. We can bring up the terminal by either pressing CTRL+ALT+T or by clicking terminal emulator from the taskbar on the upper left corner of the screen.

The Linux command-line interface (aka terminal)

Now, suppose we started a process on Linux terminal but we want to end it. In that case, we’d use CTRL+C to terminate the process. As shown in the figure, we first started a process from nmap (right now, we don’t have to worry about what it is) and using CTRL+C, we stopped it.

Aborting a process

There is another command that pauses the process instead of killing it. And that is CTRL+Z. But before that we need to know that we can cycle through our previous commands using UP and DOWN arrow key. So, we run the same process again and by pressing CTRL+Z, we can pause and suspend the process in the memory i.e. it won’t be stopped. The name of the task will be shown on the terminal. If user is running multiple tasks on the terminal, all will be paused at that moment. The name of the tasks can be viewed by entering jobs command on the terminal.

The command ls shows all files and folders on our current directory as a list. If we enter ls -l, it will show all details of the files and folders on our current directory. To enter a certain directory or folder, we enter the path to that directory or the name of the folder. For example, entering cd Desktop will take us to the Desktop folder. The tab button allows us to autocomplete our incomplete commands. If we type cd D and then hit tab twice, the terminal will show the possible suggestions within the current directory starting with the letter D but it won’t autocomplete until there aren’t any conflicts.

Traversing the file system

To create new folder, we’ll have to use mkdir. For example, mkdir “New Folder”. To clear our current terminal window, we can either type clear and hit enter or we can press CTRL+L.

The command cat copies the content of a particular file it operates on. For example, if we enter cat /etc/passwd, it will copy the contents of the password file with etc folder and display on the terminal window.

The content of /etc/passwd

The last but not the least, to copy some contents from the terminal window, we’ll need to press CTRL+SHIFT+C instead of CTRL+C. The same thing goes for pasting from inside the terminal (CTRL+SHIFT+V). To close the terminal, we can either click the close button or press CTRL+SHIFT+W.

link to previous part

link to next part

--

--

Meraj al Maksud

Student of Computer Science & Engineering at Jahangirnagar University