Linux Basics for the Aspiring Hacker,(Creating Directories & Files)

LINUX BASICS (PART.01)




This will take us directly to the aircrack-ng directory.
Now let's say we want to go to the scripts sub-directory within aircrack-ng. We could type out the full path to the sub-directory, but it's much simpler to type the relative path from where we are. We know we are /pentest/wireless/aircrack-ng, so type:
bt > cd scripts
And that takes us to the scripts sub-directory within aircrack-ng or /pentest/wireless/aircrack-ng/scripts.
Once again, it's critical to emphasize that Linux is case sensitive, so typing the directory without the proper case will result in the error message, "no such file or directory".

Step. 02 Listing Command (Ls). 
Once of most used and important commands in Linux is ls or list. This command is used to list the contents of a directory or sub-directory so that we can see the contents. It's very similar to the dir command in Windows. So let's use it in the aircrack-ng directory;
bt > ls
We can see that Linux listed all the files and directories within the aircrack-ng directory. Linux allows us to modify its commands by using switches; these are usually letters preceded by the dash (-). With ls, it's helpful to use two of theses switches, -a and -l.
The -a switch means all, so when we use it, Linux will list all files and directories, even those that are hidden. When we use the -l switch, it gives us a long listing, meaning it gives us info on the security permissions, the size, the owner, the group of the file or directory, when it was created, etc.
Let's type:
bt > ls -la
We'll examine more closely the security permissions in a later tutorial, but you must know that you need execute (x) permission on any file you want to execute. So, if you download a new tool, you must make certain that you have execute permission on it.

Step. 03 Create a File (Touch)
The create a file in Linux, it's a bit different from Windows. In Linux, we use the touch command. So, let's create a new file called newfile:
bt > touch newfile
Now we can check to see if that file exists by doing a directory listing:
bt > ls -la
We can see that new file has been created!

Step. 04 Create a Directory (Mkdir)
Similar to Windows, we can create a directory by using the make directory command (mkdir). Let's now make a new directory.
bt > mkdir newdirectory
Now type ls and we can see that a new directory has been created .

Step. 05 Getting Help (Man)
Linux has a very useful utility called manMan is the manual for nearly every command. If you should forget what a command does, simply type man and the name of the command and it will display the manual with all the info you need about that command, its switches, and arguments. For instance, type:
bt > man touch
With most commands, you can also use either the -h switch or the --help switch after the command to obtain "help" about a particular command. In the case of "touch", we must use the --help to obtain help on the touch command.
bt > touch --help