• To view the user belongs to which group :
groups Username
Groupadd group name to add group
Groupdel group name Delete group
• The user 123 is added to the group in 1234
the gpasswd -a 123 1234
• the user 123 is removed from the 1234 group
gpasswd -d 123 1234
• Linux Rights Management
Linux file types:
- binary file
d directory
l link files
using ls -l path Specifies the path to the file to view a detailed list
-rw-r - r-- 1 root root 0 . 9 10:22 123.txt dated 12 is
drwxr XR-2 X-dated the root the root. 9 4096 11 09:20 backups
first column: file type and permissions
second column: the number of subdirectories River the number of connections
in the third column: the file owner
fourth column: file belongs to the group
fifth column: file size
sixth column: the date and time of
the seventh column: the file name
in the first column in a total of ten, 1st file type, bits 2-4 of the current owner of the file permissions, file permissions bits 5-7 belongs to the group, bits 8-10 of the file permissions others
permission number:
R & lt: read. 4
W: Writable 2
x: executable. 1
rwx r--. 7 -wx. 4. 3. 6 644 rw- 123.txt
change permission :
chmod [who] [+ | - | =] files or folders
[who]: u g belongs to the owner of a group o everyone else
+: Add
-: Cancel
=: assignment of certain rights
to change the way permissions recommended numbers :
chmod digital files or folders
Change an owner or owning group :
chown root / test will test the owner of the folder is changed to root
chgrp ADMIN / test will be changed to test your group folder ADMIN
chown root: root / tmp will be the owner of the / tmp folder change to root for the root belongs to the group
chown -R root: root / tmp to / tmp folder of all files to root your group owner to root
chown -R 777 / tmp to / tmp folder of files of all file permissions to 777
meaning permissions for files and folders in the
file folder
r: you can view the contents of the file can list folder contents
w: can modify the file can create and delete the folder
x: can perform file folders can enter
tar file compression and decompression
View network status netstat
nslookup dns View
program running ps to see
top view real-time programs running
service control service controller enables close the service
curl page redirect
wget to download files
• memory management
ps view the system processes
ps -u / -l is affiliated with the current user process information
ps -aux to see all the users in the system processes information
ps -aux | grep 123 to view the information specified 123
ps -le | grep ssh process information
kill shutdown process
kill pid
-9 forced shutdown
-l restart the process
killall shut down all processes
• View port information
netstat -ano (Windows)
netstat -ntulp (Linux)
Top display process information
top -c display the full command
top -d 5 updated
top -p pid pid view a specific information
free linux display of free memory, physical memory usage, swap memory, Buffer
xhell first time you connect ssh kali system
xshell: help us to connect the kinds of service platform to facilitate the management server, the link can be encrypted (ssh / vsftp)
the STEP 1: open ssh service in kali, service ssh start, detection is turned on success, / etc / init.d / ssh status or netstat -ntulp | grep 22
the STEP 2: Turn off the firewall (currently) /etc/init.d/iptables stop, and then need to find ssh configuration file, / etc / ssh / sshd_config, in about 27 lines, the "#PermitRootLogin prohibit-password" amended to "PermitRootLogin yes", save and exit!
Step 3: service ssh restart, use xshell connection using the root account or accounts common
Step 4: xshell:? File New protocol selection ssh, enter kali host of IP, port 22 is the default, click "Connect", then enter the root account, and finally enter a password to connect?.
Note: ssh service can change the port, edit the configuration file, port 22 - port 2222?
Kali replacement update source
sources.list kali source files are stored in / etc / apt / down, we opened with vim
Vim /etc/apt/sources.list
Leafpad /etc/apt/sources.list
# Ali cloud Kali source
deb http://mirrors.aliyun.com/Kali as Free Kali main contrib non-
deb-src http://mirrors.aliyun.com/Kali as Free Kali main contrib non-
deb HTTP: // Mirrors. aliyun.com/Kali-security Kali / updates main contrib non- free
above the updated source file to replace the original contents of the input terminal in the following order
apt-get update&&apt-get upgrade&&apt-get autoclean
There is no date to re-enter until the updated software, and then enter the apt-get clean, and finally enter reboot reboot, the update is complete.
Kali install software
Apt Search Tools Open-vm-Desktop-
Apt-GET-vm-install Open Desktop Tools-
reboot
• Network Management Linux
the ping
ifconfig
route
netstat
arp
traceroute to view the packets in the network path
ss displays socket communication information
ss -t -a tcp connection
ss -l display all network ports open