📜  Kali Linux命令

📅  最后修改于: 2021-01-05 04:55:37             🧑  作者: Mango

Kali Linux命令

让我们看看Kali Linux中一些重要且常用的命令:

Commands Description
# history This command is used to print the bash history of the current user.
# free It gives the information about the available RAM and the total used and available spaces of physical memory and swap memory with buffer used by Kernal.
# vi It is a screen editor used to edit the file.
# sort It sorts the content of a text file line by line.
# more It is used to display output in the terminal, one page at a time.
# less It is used to view the file instead of opening the file.
# date This command is used to display the system date and time.
# cal It will display a formatted calendar of the current month.
# whoami It will print the active user ID.
# pwd It stands for “Print Working Directory” which prints the name of the working directory.
# ls It is used to list out all the hidden files of a directory with -an attribute.
# users It will display login names of the user currently logged in to the system.
# uptime It will return you the time for which the system has been up.
# uname It prints information about the current system.
# rm It is used to delete files and directories.
# mv This command moves, or renames, files, and directories on your file system.
# cp It is used to copy files.
# cat It is used to create single or multiple files, view contained file, concatenate files, and redirect output in terminal or files.
# mkdir It is used to create directories.
# cd It is used to change or switch the current working directory.

命令结构:

  • 改变工具行为
  • 带连字符的字母
  • 可以分组
  • 例如ls -alt
  • 以双连字符开头的单词
  • 例如ls -help

命令参数

这是告诉命令要执行的操作的额外信息。如果我们使用的是选项,则参数后面是参数。例如-ls -l / Desktop

在Kali Linux中创建目录

  • 要创建目录,请在终端内输入mkdir / tmp / testdir。它将创建一个名为tetsdir的目录。
  • 要创建父目录,请输入mkdir -p / tmp / dir1 / dir2。
  • 要在目录中创建文件,请输入/ tmp / testfile。
  • 要查看目录,请使用ls命令。

列出目录内容

  • -l-长清单
  • -a-列出隐藏文件
  • -r-以反向名称列出
  • -t-先列出新文件
  • -rt -list倒序显示(从大到小)