Introduction to Linux Terminal

If you really want to learn about computer hacking you have got to understand how to use the Linux, and if you really want to master the Linux environment you have got to master the command line system which is known as the terminal in the Linux world.
I guess some one is sweating out there!!!
Please do not panic the terminal is very simple to use, You must have been wondering why will I ever want to use the terminal?
well in my simple opinion: there are some hacking tools that will not run in a GUI environment but will only run in the command line, another reason is that people see you as a cool nerd when they see you tinkering on the terminal, and the most important of all is that the terminal is a very important environment to work with.
Enough of eulogizing the terminal and lets get down to the business of the day which is a little introduction to the terminal commands.

1. Ls

I use this tool everyday and it is a workhorse. It is great for listing directory contents and checking file ownership and permissions. I normally use something like ls -alth, this means:

a – show all file contents (including hidden files)

l – display a long list

h – Human-readable format (for file sizes)

t – Sort the output by the most recently updated file.

Check the man files on ls for more information.

2.    Pwd (Print Working Directory)
This command print your current working directories, or display your present location on the machine.
3.    Cd (Change Directory)
This command helps in moving from one directory to another on the machine. You must type in the name of the directory you want to move to after the cd command. Note: the directory name is case sensitive in the terminal Habeelety is different from habeelety, the amazing part of this story is that you can create two Directory with the same name but with different case on Linux which is not permissible on Windows.

4.    Mkdir (make directory)
Another useful command on the terminal is the mkdir command. This command is used for creating a directory or folder in windows term. Just type mkdir <folder name>.

5. clear (clear screen)
clear  is is useful when you want to clear your terminal. This comes handy when you have been typing on the terminal and you have a long row of display or you just move to a new directory, I always try to clear the terminal.
6.    rm (remove)
rm is used for removing files or directories. This is technically deleting file from the system or moving it to the trash. I kept wondering why rm instead of del or delete, del/delete seems more familiar than rm. I think rm looks more friendly than del/delete, del/delete sounds more mean than the rm command <just thinking>.
 7.   Sudo
Whenever you get the “Permission denied” message, just prefix that command with sudo.
Sudo allows a user to execute a command as root and requires the user to provide a password. On standalone boxes; it will work just fine; however, it will not work on remote hosts if the user is not listed in the sudoers file.
8.    Su (Super User)
Sometime you need to be logged in as root to be able to perform some operations this is when the su command comes handy and useful.  Just type in su and follow by the enter key, you will be prompt for your root password. Note: please be careful when login in as the root, because any change done here will affect all other user on the machine. So you need to understand what you are doing this is not a place to experiment, because you can damage your system easily with this privileged.

9.    Cp (copy)
This command is use for copying file from one location to another, you type cp <file to be copied>  <to the final destination>

10. History, ! and !!

The history command prints out a list of commands that have been used; this makes it easier to look for some  command that you executed in the past but don’t know how to write anymore. I usually combine it with grep. For example, history | grep ssh.

To repeat one of the old commands, I take the number before that line; lets assume it is 892 and execute !892 and viola! Done!!

Comments

Popular posts from this blog

Birth and Death of Bulk SMS Business in Nigeria

WHAT YOU NEED TO KNOW BEFORE LEARNING A PHP FRAMEWORK

Free Open Source Software That Could Make You Rich