OSCP-1 Simple Knowledge

This is very shallow, hands-on look, will jump

kali command line:

pwd current working directory

Example cd change directory cd / var / www / html

man pages, see the instructions of a command, q to quit example man pwd

ls display the current directory files. Common ls -l and ls -la, -l see more, with permission, a show that is all, including hidden files hidden files ,, there is a point in front of the name, example .cache

  example:

    drwx r-x x-x 10 abc daddy 4049 Dec 9 15:00 .cache

 

    drwx: front four is the owner of the file permissions,

    rx: 5 Dao seven bits are the group permissions

    xx: 8 Dao 10 bits are user rights

    This is the first d refers to the directory, -: normal file, l: Link file, b: device file, c: character device file, p: pipe file

    Other bits: r refers to read read. w is writable, x executable, - not

mkdir create a new directory Example: mkdir new

rmdir remove directory

touch new file named text.txt in touch with ordinary ships nano nano exploit.py

cp copy it. cp text.txt / tmp directory other test currently. cp /root/text.txt / tmp directory other test other directories

mv move. Try to use cp. After Xiankao delete, reduce the misuse leads to missing files

updatedb locate command to create or update database files that you must simply say that the former is to find a use by

locate to find stuff. . . locate flag                  

adduser add a user, example, adduser Tom and enter the password

su replace user, su Bob

sudo this usage more, behind which it is used which elaborate,

echo echo hello displayed on the command line, echo hello> hello.txt hello this is written in the first line of the file, echo hello >> hello.txt this is written on a new line.

chmod digital rights law, represented by digital file permissions problem above mentioned ,, hands-B / G found some familiar with the commonly used chmod 777 owners can perform read and write.

ifconfig win is ipconfig. ,Internet Information

ping example: ping 192.168.1.2 -c4 ping4 times, otherwise would have been ping. The latter figure is the number of times -c

service run stop service apache2 start serving patients stop on the start into stop (web page services there / var / www / html, the start put away a simple Web page came out)

Extended:

  service ssh start

  netstat -antp | grep ssh ssh View status

  systemctl ssh start boot ssh

  service postgresql start 

  As set systemctl ssh postgresql database services and open source ssh to boot it

Hungry, eat

  

 

Guess you like

Origin www.cnblogs.com/int21h/p/11606751.html