First week 1 2

Open the dos command window

windons+r–>Run—>cmd

Hold down shift+mouse right click and select here Open the command window here

In a folder on the disk, select the input box in the title bar and enter cmd and press Enter

windows Commonly used commands under

System management and file management

Systeminfo Obtain system information, system patch network card

Path view environment variables

Set view System variables

whoami Check who the current user is

Hostname Check the current host name

mkdir folder name to create a folder

rmdir file Folder name delete folder

cd folder path

Path: absolute path The path written from the current drive letter position

. Represents the current path

.. Represents the upper-level path

Relative path Path relative to a location

Path

dir View current Which files or folders are there in the path

Note that files and folders beginning with… are hidden by default

echo icq >. /qet.txt write to current path

echo icq >/qet.txt write to root directory

type iqet.txt read file

del delete file< /p>

User Management (Administrator)

net user View which users are in the current system

net user guest View guest user information

net user guest 123.com Modify guest password 123.com

net user username and password/add add account

Note: The account added by default is the users group

/ Forward slash

\ backslash

net user username /del delete the specified user

net localgroup view local groups

net localgroup users view Specify group information

net localgroup bp /add Add group

net localgroup administrators hacker /add

Add ordinary user hacker to the administrator group

>

net localgroup administrators hacker /del delete

create hidden account

net user icq$ 123 /add

Yes Delete in the control panel can also be deleted by del

Other commands

ping

ipconfig

ipconfig / all

ipconfig /flushdns refresh the dns cache

ipconfig /release release the current ip applicable dhcp to obtain the ip

ipconfig /renew to obtain the new ip

arp -a View the cache table of arp

route print print the local routing table

net user hacker /active: no disable hacker users

net user hacker /active: yes to activate the hacker user

net share View the local default shared resources

net share ziyuan=c:/ Manually add shares

net share ziyuan del Manually delete the share

1. VM installation virtual machine

1 .Create a new folder named in English on the free disk

2. Find the OSI file, open the VM to create a new virtual machine, and follow the wizard to install

share picture

 Share picture

Share a picture

share picture

< /p>

share picture

< /p>

Share a picture< /p>

share picture

share picture

share picture

Commonly used Linux command:

ls view the file list or folder list under the current folder or other folders

ls -l detailed information list

ls- al View the detailed information of all file lists

Share a picture

cd ./current directory. ./Upper-level directory

Share pictures

< /p>

clear = ctrl+l clear screen

ping

touch index.html create file

p>

share picture

p>

echo’hello world!!!’>index.html write data

cat index.html view file

more index.html /less index.php The difference will be discussed later

tac index.html read file

share picture

mkdir test create folder

Share a picture

rmdir test delete folder

share picture

rm index.html Delete file

rm -rf dede Force delete folder

cp /var/test.log ./ Copy /var/test.log to the current directory

mv /var/test.log

root/dede move the /var/test.log file to the /root/dede folder

/ root directory

~ home directory cd and press Enter and return without data Home directory

cd =cd ~ =cd /root Enter the root home directory (the currently logged-in user is root)

cd =cd ~=cd /home/test/ Enter home directory of test (the currently logged-in user is test)

[[email protected]~]#

root means the currently logged-in user

localhost means the current The name of the computer to log in

~ indicates the current working location, home directory

# The current user is root

$ The current user is a normal user

< p>su test switch to test user, note: switch from root to normal account, no password

whoami who is the current user

id to view the uid of the current user Note: uid=0 The user is root

su root=su needs to enter the root password

hostname computer name

Read the file and display a part of the more file Name

Click to load more display percentage q Exit

The percentage of less file name does not display

The head file is displayed by default 10 lines

head -n 4 file displays the first 4 lines

tail file name displays the last 10 lines by default

tail -n 4 file displays the last 4 lines< /p>

share picture

< /p>

Common commands for finding files

find /etc/ -name’*network*’

locate ifcfg -ens33 (Note: Need to update the database upd atedb)

Share pictures

< p>

The Whereis system command finds out the specific location of the system command, and the file may not be found

share picture

The form of the file exists. For example, the network card has a file in linux to indicate the network card (configuration file), ifconfigàens33àfind /etc/ -name’*ens33*’

centos7 network card configuration VM’s network card type selection is NAT. The method of IP allocation is DHCP

The first IP is automatically obtained Find the configuration file /etc/sysconfig/network-scripts/ifcfg -ens33

Share a picture

Share a picture

p>

If you want to edit and position the cursor to the position that needs to be modified, enter a/i/o to modify the data, click esc, enter: wq enter to save and exit.

/etc/init.d/network restart

Service network restart

Systemctl restart network

Share picture

Check IP ifconfig ifconfig ens33

ifdown ens33 turn off the network card

ifup turn on the network card

share picture

ip add View all network card IP

ifconfig ens33 192.168.1.110 255.255.255.0 Configuration IP Temporary

The second configuration static IP

Down is dropped on the up network card ifconfig look See if the IP has been modified

Share a picture

/p>

Firewall

service firewalld status

service firewalld stop Turn off the firewall

ping baidu.com -c 4

share picture

Change the name mv test.heml test.php Modify the file name

3 types of VM network settings

NAT mode

 Share picture

< p>DHCP dynamic address allocation protocol

Only the host mode uses the network card vmnet1

Can’t ping through the external network and can ping through the host

Share a picture

Bridge mode

PC and host are equal

Linux switch and operation Mode

reboot

shutdown -h halt poweroff shutdown

login

init number

0 shutdown

1 single user mode

2 multi-user mode without network support

3Multi-user mode with network support

grep search designation Keyword file content or folder

grep keyword path

cat path| grep keywords

share picture

Find path

-name find the file with the specified file name

-type find the file with the specified file type

-time find the file within or outside the specified time Modified files of

-atime Files accessed in the last 2*24 hours

-ctime Files changed in the last 2*24 hours

-mtime The file whose file data was changed in the last 2*24 hours

-size Find the file with the specified file size

< p>

The meaning and purpose of all folders under the root directory in Linux

/ root directory

cd/ switch to the root directory

/bin put executable files

/dev device files

/media removable device files

/opt third party The directory where the software is placed

/tmp stores temporary files

/root root user’s home directory

/home ordinary user’s home directory

/etc configuration file

/usr stores software resources

/var files that change regularly

< p>Kali system installation

The first step is to create a new folder to store image files

Share pictures

phpstudy implements w(windows)a(apache)m(mysql) p(php) environment
apache is used to publish web service port 80
MySQL open source simple and flexible database suitable for small and medium-sized enterprises 3306 port
php background scripting language is responsible for parsing user request codes

< br>Open phpstudy to view the open port
dos: netstat -ano |findstr 80
TCP 0.0.0.0:3306 local ip 0.0.0.0:0 webip LISTENING status 11860 pid: process id number
Access web server: http://127.0.0.1
http://localhost
http://any network card ip of this machine
First see the probe page
Enter the source code location of phpstudyphpstudy/www/ will l .php phpinfo.php delete
manually write index.html
phpstudy’s apache port is occupied Other options -> phpstudy settings -> port general settings change ht tpd port, modify it to 81, click apply

After the change, visit the url: http://127.0.0.1:81

share picture

share pictures

Leave a Comment

Your email address will not be published.