Learn Penetration Testing
上QQ阅读APP看书,第一时间看更新

Basic commands in Kali Linux

There are some basic commands in Kali Linux that are very useful to know. Some of these useful basic commands include locate, chmod, find, ls, cd, and pwd:

  • locate: I use this command often; it can be used to easily locate a specific file. Before using the locate command, you need to perform a database update using updatedb, as shown in the following screenshot (Figure 20):
Figure 20: Using the locate command
  • chmod: This command is useful if you need to control the permissions of a file. Some tools, when downloaded, will require you to modify the permissions so that you are able to execute them. For example, chmod 600 sets the file so that only the owner can read and write, as shown in Figure 21:
Figure 21: Using the  chmod command
  • find: This command is a more intense search tool than the locate command; here, find searches any given path as shown in Figure 22:
Figure 22: Using the find command
  • ls: This command is used to list the contents of the current directory. Using the -a switch will display hidden files and folders.
  • cd: This command is used to change the current working directory. It is also known as the chdir command.
  • pwd: This command prints the working directory, which simply displays the name of the current directory that you are working in.

All of these listed commands are a good starting point to get you familiar with the core functions in Kali Linux. If you are looking for a complete A-Z list of commands, these can be found easily using your favorite search engine.