Most of the commands below need to be entered in the console/terminal/shell. View software xxx installation content Check the usage of graphics card
Check hard disk usage
View user quotas and usage
Open visdom
You can add parameters later, such as opening the 9099 port in encrypted mode.
View the information corresponding to a process
For example:
View the login records of a specified user
File compression Compressed folder
Unzip the folder using zip
View the size of sub-files and directories under a directory
View the number of files in a directory
Batch copy files with specific file names
Move a folder
Copy a folder
# Copy everything in the /home/user1 directory to /root/temp/ without copying the user1 directory itself. Deleting Files/Folders
When there are too many files to be deleted, an error may be reported:
The solution is as follows
Specifically, the frequently used codes are:
Create a folder
Check IP address
Execute multiple commands simultaneously 1. Each command is separated by ;: each command will be executed, but it is not guaranteed that each command will be executed successfully. This article is reproduced from: Check the cuda version
Screen related commands
View software xxx installation content
Find software in the software library
Package displays statistics of system installed packages
Display the names of all packages available on the system
Display information about a package
Find which package a file belongs to
Check which packages are installed
Query which packages software xxx depends on
Query which packages software xxx depends on
Add a CD source
System Update
View the temporary storage directory of the downloaded package when installing the software
Clear the cache of old versions of software
Clear all software caches
Remove orphaned software that is no longer used by your system
Completely remove Gnome
One-click installation of LAMP server
View the modules loaded by the kernel
View PCI Devices
View USB Devices lsusb#
Check the network card status
Get the CPU serial number or motherboard serial number
Display system uptime
Partition Mount
# Common file types are as follows: iso9660 CD-ROM file system, vfat fat/fat32 partition, ntfs ntfs partition, smbfs windows network shared directory, reiserfs, ext3, xfs Linux partition Partition Unmount
Run interactive programs in the background, and do not terminate the program after logging out.
Check the network card address based on IP
View the current IP address
Common server commands 1: View installed software
2: The port is occupied
2.2, query the process number by program name:
2.3, Query process details by process ID
3: Restart nginx
nginx 502 [Server down] 4; Unzip the war package
4: =Global Deployment====================
nohup means running the command without interruption. When the account is logged out or the terminal is closed, the program will still run. 5: View the program 5.1, view the file path: rpm -ql program name // nginx error nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory) 6: =Check the jdk path=
7: Register the jar package as a server = 7.1, create the executable file .sh file
7.1.2, Create the executable .sh file vim demo-stop.sh
Check the JDK path: which java 7.2, create a .service script and start it automatically at boot
7.3, Related commands Restart the configuration file
[Install] 8.1, Find file: find / -name file name 8.2, Check whether the project is started: ps ef|grep project name Added common server commands IP: 111.111.111.111 Server connection user: username Common file paths are as follows: Apache2 virtual directory configuration: /etc/apache2/sites-available/default, if you need to add it, just add it at the bottom Common operation commands: cd ~, enter the root of user username sudo chown www-data:www-data /webroot/directory name -R, change the directory permission to the ftp master user sudo vim /etc/apache2/sites-available/default, edit the apache configuration file sudo service apache2 restart, restart apache2, other services can also be used, restart is restart, stop is shutdown, start is start. To restart a service, you can also use: sudo /etc/init.d/apache2 restart sudo service mysql restart, same as above (all services are in the /etc/init.d/ directory) sudo du -h directory name to view the total size of the directory sudo rar x filename.rar, decompress the rar file, decompress the full path sudo mkdir directory name, create a directory ln -s /www/xxx.xml /www/xxx/sitemap.xml, the method to create a soft link is: ln -s real file virtual file but you need to create the virtual file and the real file first /webroot, the root directory of the website The password created for ftp is the mysql password. You need to manually create a mysql user. To delete the mysql user, use the command: drop user username@localhost. This is the end of this article on the summary of commonly used commands for servers Ubuntu. For more related commonly used Ubuntu commands, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! |
<<: A brief discussion on the implementation principle of Webpack4 plugins
>>: Detailed explanation of how to create MySql scheduled tasks in navicat
Recently, when I was learning docker, I found tha...
ScreenCloud is a great little app you didn’t even...
This tutorial explains how to verify the IP addre...
Table of contents Prerequisites DNS domain name r...
We all have files stored on our computers -- dire...
grammar background: linear-gradient(direction,col...
First, the server environment information: Reason...
1. CSS realizes fixed width on the left and adapt...
Because I have always used vscode to develop fron...
Custom tags can be used freely in XML files and HT...
Preface smb is the name of a protocol that can be...
Error description: 1. After installing Nginx (1.1...
Preface For a data-centric application, the quali...
Preface When using the Deepin user interface, it ...
This article uses examples to illustrate the usag...