Virtual machine version Default user root password Toor
LS: Displays the files and folders contained in the current directory
Ls-l: Displays the files and folders contained in the current directory in the general format (the opening letter explanation: D: Directory-: File C: Device file L: Link B: Block device, such as hard disk partition)
Ls-a: Show hidden Files (start with.)
LS-LH: Displays the files and folders contained in the current directory in a general format that is appropriate for reading
LS-LH--sort=size: Sort by file Size (=time: Time)
Cd/media: Enter Media directory (.: Current directory: Parent directory directly to the user's home directory using CD ~#)
PWD: View current working directory
Cat,more,less: Viewing the contents of a file
Tail: View the following 10 lines of the file (tail-20: after 20 lines)
Watch-n 2 Tail [File path]: Check the 10 lines of the file every 2 seconds
RM [file name]: Delete file rm [directory]-r: Delete Directory
CP [file name] [new filename]: Copy file and rename CP [directory path] [new directory name]-r: Copy and rename directory
Top: Monitor system performance (kill by K [PID]: Close process)
Ps-ef,ps eux: viewing process details
Grap [SS] [File path]: Displays lines with SS characters in the file
Ifconfig: View network configuration information (IP, etc.)
Ifconfig eth0 down/up: Close/start eth0 NIC
Macchanger-m 00:11:11:11:11:11 eth0: Mac that changes the eth0 NIC (restores the default Mac after restarting)
Netstate-pantu: Viewing network connection Information
Netstat-pantu | egrep -v " 0.0.0.0|:::|and| Address | awk " {print} " | cut -d " : "-F 1 | sort | uniq > IP /* egrep is grep's upgrade version-V means excluding awk ' {print $} Output Fifth Column cut-d ': '-F 1 to: separate and output the first part sort: sort uniq: The same output only one Write file >>: Write to file without overwriting, then write */
Mount: View mount information is primarily used to mount an ISO image: Mount-o loop kali.iso/media/cdrom Mount Kali.iso to the CDROM directory
DMESG: View/var/log/messages file
Find: Locate a file or folder-name/iname: followed by the target name
Whereis: Find in database, find results incomplete, updatedb Update database before normal use
Whereis-b nmap: Find binary file, name is Nmap
Echo: Next to the output, print to the console
Vi:vim Short, a very complex command mode file editor, directly after the VI Plus to edit the file name, basic usage: input: After input command, set Nu can display line number,: Wq Save and exit, I insert State, a add state, you can edit the text, Through the arrow keys to move the cursor to modify the content, after the modification, press ESC to exit the command mode, you can continue to enter: wq! Implementation Force save exit; Press two D to delete the specified line, o insert a row below the cursor designation, y to copy one line, and p to paste.
Pipe Break: | You can then add the conditions for executing the previous command & sequentially execute the two connected commands && the previous execution succeeds before executing the following command | | The previous execution was unsuccessful before performing the subsequent
Common bash commands under Kali Linux