Learning common commands of liunx (additional from time to time)

su Enter to enter the linux password // give the highest authority

grep -rn 'query content' // output the file in the directory where the query content is located and the corresponding number of lines

rm -rf file/directory // delete a file or directory

mkdir directory // Create a directory.

mv [options]... [-T] source file target file
mv [options]... source file directory
mv [options]... -t directory source files...
 
chmod -R 777 directory // Give the directory and all files and directories under the directory the highest permissions

sudo mount -t cifs -o username=NVC //192.168.30.70/windows_linux_share /mnt/my_share
// Enter the windows user password after pressing Enter to access the windows_linux_share directory in /mnt/my_share in linux


The above are the commands I use more often. If there are any shortcomings, please leave a message for guidance.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326203471&siteId=291194637