kail linux vm tools mounting method:
1. Virtual Machine top bar "virtual machine (M)" --- "to install VMware Tool (T)";
2. The desktop appears a small disk, titled "VMware Tools", double-click the point to open;
3. unzip it to your desktop or elsewhere, and to extract the right place "to open a terminal (E)";
4. Enter "./vmware-install.pl", the transport has been, until completion;
5. Enter "reboot" restart the virtual machine;
6. Type "apt-get install open-vm-tools-desktop fuse", prompt enter "yes";
7. restart, after which you can communicate with the virtual machine host file.
Vim / vi editor mode of operation
Three modes:
!! Command Mode: vim state in which the file is opened, the: wq save and exit, enter and: q, type: w Save, type: w Force Save, type: q force-quit;
Input Mode: In the command mode, enter a / i / o to enter edit any
a: Enter the start of a cursor
i: In the starting position the cursor input
o: the cursor next line start input
A: the input end of the line where the cursor
I: In the beginning of the input line where the cursor
O: input cursor on one line, the current first line creates a new blank line
The bottom of the command mode:
When the current in the input mode, press ESC, enter: to enter the bottom of the command mode
When the current is in command mode, enter :( directly under the English input method: not :) command mode to enter the bottom of Chinese
Find data in Vim:
You need to look in command mode
Input [/ + the character to find], the location of the characters can be displayed, by pressing the enter key to look down n
Replace data:
:% S / key1 / key2
, key1 first occurrence of each row replace key2
:% S / key1 / key2 / g - to replace all key1 key2
: S / key1 / key2 - key1 the cursor line first appears is replaced key2
: S / key1 / key2 / g in the current row replace all key1 key2
VIM other operating (command mode)
x delete a character behind the cursor
X to delete a character before the cursor
dd Delete cursor line
After the cursor ndd Delete n lines
yy copy cursor line
P paste the copied data to the next line of the cursor
P copied data pasted to the cursor on the line
Undo the last action u
: Set nu - set the line number
: Set nonu - cancel the line number
Modify the Linux root password: sudo passwd root and then enter the account login first enter the current password, then enter the root password
Archive related operations
takes
Tar -cvf fire.tar f1 f2 f3 f1 f2 f3 files packaged into file.tar
package -c
-v display process
-f specifies the file
Tar -zcvf file.tar.gz f1 f2 f3 f1 f2 f3 files packaged as a compressed file.tar.gz
-z format for archive is zip / gz
Tar -zxvf file.tar.gz decompression
-x Extracts
Zip
Zip test.zip f1 f2 f3 f1 f2 f3 file compressed into test.zip
Unzip test.zip decompression
Open multi-terminal shift + ctrl + t
Switching terminal: alt + number
The current lack of user permissions, you need to sudo (give users a temporary root privileges to current operations) or su root / su (need to know the root password)
User management under Linux
User information is stored / etc / passwd, the average user has read access
Real users: change the password, you can log
Pseudo-users: the application will run at runtime some privileges, and use the program name to represent the program, and the presence of / etc / passwd file, the user can not log in directly pseudo
pentest (user name): x (password): 1000 (UID): 1000 (GID): pentest ,,, (description): / home / pentest (home directory): / bin / bash (default parser)
The last change to / sbin / nologin, the user can not log
User passwords are stored in / etc / shadow, under normal circumstances, ordinary users do not have permission to read
pentest (username): $ 6 $ Fq0je7pf $ kDasczSHFj9k1XO2xArIymt8IzDK97jbXjD8XvFvVMohp2RBHMKBuUbHSlR6NBlhh1tFrxe0tujp.fmgW9kKB (password) /: 18150 (last modified time password): 0 (effectively modify the minimum time password): 99999 (maximum time): 7 :::
After three is password policy
Add user:
Useradd [options] username
Plus password:
Passwd username
delete users:
Userdel Username
Users are automatically added by default user name and join the same group
Icq icq
Root root
Pentest pentest