Kali Linux is a distribution of Linux specifically designed for penetration testing. It has hundreds of tools preinstalled, saving you the hours it would take to download and install them yourself.
Directory is the same as a folder in Windows. A directory provides a way of organizing files, usually in a hierarchical manner.
Home Each user has their own /home directory, and this is generally where files you create will be saved by default.
root Like nearly every operating system, Linux has an administrator or superuser account, designed for use by a trusted person who can do nearly anything on the system.
Script is a series of commands run in an interpretive environment that converts each line to source code.
Shell is an environment and interpreter for running commands in Linux.
Terminal is a command line interface (CLI).
The Linux Filesystem
| The FileSystem |
- /root The home directory of the allpowerful root user
- /etc Generally contains the Linux configuration files—files that control when and how programs start up
- /home The user’s home directory
- /mnt Where other filesystems are attached or mounted to the filesystem
- /media Where CDs and USB devices are usually attached or mounted to the filesystem
- /bin Where application binaries (the equivalent of executables in Microsoft Windows) reside
- /lib Where you’ll find libraries (shared programs that are similar to Windows DLLs)
BASIC COMMANDS IN LINUX
CHanging Directories with cd
To change directories from the terminal, use the change directory command, cd. For example, here’s how to change to the /etc directory used to store configuration files:
Listing the Contents of a Directory with ls
To see the contents of a directory (the files and subdirectories), we can use the ls(list) command. This is very similar to the dircommand in Windows.
This command lists both the files and directories contained in the directory. You can also use this command on any particular directory, not just the one you are currently in, by listing the directory name after the command; for example, ls/etcshows what’s in the /etc directory.Searching with locate
Probably the easiest command to use is located. Followed by a keyword denoting what it is you want to find, this command will go through your entire filesystem and locate every occurrence of that word.
To look for aircrackng, for example, enter the following:
Finding Binaries with whereis
It’s important to note that rmdir will not remove a directory that is not empty but will give you a warning message that the “directory is not empty,” as you can see in this example. You must first remove all the contents of the directory before removing it.
Just a word of caution, though: be wary of using the -r option with rm, at least at first, because it’s very easy to remove valuable files and directories by mistake. Using rm-rin your home directory, for instance, would delete every file and directory there—probably not what you were intending.
Comments
Post a Comment