current location:Home > Technical Articles > System Tutorial > LINUX
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- Intelligent method of obtaining local IP in Netty project to improve code portability
- 1: Scenario description When working on Netty-related projects, when checking the disk space in Linux, we often need to bind the IP and port number of the local machine. If we write it in the configuration file, Linux programming can obtain the IP, so that every time we change laptops The configuration file needs to be changed when running or deploying to other environments. This will be more troublesome. If we make it smart to obtain the local IP, the portability of our code will be enhanced. Next, I will introduce a way to intelligently obtain the LAN IP and intranet IP of our machine under Windows and Linux. Linux programming to obtain the IP. Please give me some advice if there is anything wrong. 2: The solution and code are first posted on the tool class for obtaining the IP/**
- LINUX 744 2024-07-25 07:46:53
-
- Linux system partition formatting and mounting disk
- When installing centos on the server, usually the Linux system partition defaults to 3 partitions, with a maximum of 4 primary partitions. Others can be mounted according to your own needs. /Root partition, usually about 10-100G (depending on the total disk size) /boot system operation partition (100-500MB is enough) /swap virtual memory temporary partition (usually 2 times the memory) If there is any remaining disk Keep it and mount it later. After installing the system, start formatting the remaining partitions and mounting them. 1. First check the unassigned partition names. Some are different. Mine are /dev/sda and /dev/sdb. sda is the system partition and sdb is the storage data partition. #fdisk-lDisk/
- LINUX 556 2024-07-24 16:34:53
-
- How to hide important files in Windows without software
- There are some secrets in everyone's computer, but when others need to use your computer, they may see it, but if we don't want others to find it, we can hide it so that others will not see it. 360 File Vault, Tencent Computer Manager, etc. Using software is cumbersome and too large will slow down the system. Moreover, most software cannot encrypt the entire drive letter. Let me share with you a method to hide the entire drive letter. What I will introduce to you today is to hide the entire disk and set up a hidden entrance without using downloading software. The E disk of my computer stores my personal data, so I will use the E disk as a demonstration. Right-click My Computer---->Manage and select Storage---->Disk Management, right-click the drive letter you want to hide----&
- LINUX 1132 2024-07-24 16:09:05
-
- Redhat 7 Linux system firewall: enabling, disabling and status checking
- How to stop/start and disable/enable the firewall on Redhat7Linux system The firewall on Redhat7Linux system is enabled by default. There is generally no need to disable the firewall. There is no need to disable the Linux firewall at boot, but it can be very convenient for testing purposes, etc. On Redhat7Linux systems, the firewall runs as the firewalld daemon. The Bellow command can be used to detect the firewall status: [root@rhel7~]#systemctlstatusfirewalldfirewalld.service-firewalld-dynamicfirewalldaemonLoaded:load
- LINUX 1105 2024-07-24 15:43:23
-
- Multiple ways to execute shell scripts in Linux and sharing of specific methods
- There are many methods to choose from to execute shell scripts in Linux. In this article, I will share with you the specific methods of adding shell script execution permissions in Linux. The first step in creating a script file is to use the following command to create a new file with a .sh extension: [root@localhost~]#touchhello_script.sh Write a simple script and use the vim editor to open the newly created file with linux execution permissions. The following bash script is added to the file: [root@localhost~]#vimhello_script.sh Below is the script content added to the file: #!/bin/bashecho
- LINUX 573 2024-07-24 09:51:06
-
- What is a lightweight process? This article will give you a deeper understanding
- 1. What are lightweight processes? Before understanding lightweight processes, we first need processes and threads. We all know that a process is essentially a collection of pcb, virtual address space, page table and code data, that is, a collection of kernel data + code data. It looks like this from the user's perspective. From a CPU perspective, a process is the unit that allocates system resources. As for threads, they are executed within the process and are the basic unit of operating system calls. Although the CPU does not know which processes or threads, Linux processes and thread kernels when scheduling, it only recognizes the PCB structure. That is, the Linux version of execution flow, and this thing is a thread. Different operating systems may use different structural forms to implement threads. And in linu
- LINUX 1133 2024-07-24 09:38:19
-
- How to use the uname command to view version information in Linux systems
- Check the version information under Linux in the Linux Learning Forum. The commonly used command is unameubuntu system: $uname-aLinuxwanghaifeng-laptop2.6.32-23-generic#37-UbuntuSMPFriJun1107:54:58UTC2010i686GNU/LinuxRedHat system: $uname-aLinuxlocalhost.localdomain2 .6.18-194.el5#1SMPTueMar1621:52:43EDT2010i686i686i386GNU/Linu
- LINUX 662 2024-07-23 21:14:57
-
- Detailed explanation of mapping FTP to Windows
- 1. Go to My Computer on the dual-machine desktop, and then click Map Network Drive 2. Select Map Network Drive 3. Select Connect to a website that can be used to store documents and pictures 4. Next Step 5. Next Step 6. Fill in the FTP according to the example Address 7. Enter the username to log in anonymously and connect to the default directory of FTP. Enter the username to connect to the user directory. Here I often use the directory under the user name, so enter the user name. 8. Give the connection a name, the default is 9. Click Finish 10. At this point, double-click to open My Computer, and you will see that the FTP has been connected. You don’t have to enter the address, username, and password every time you use FTP in the future. 11. Open FTP and you can see the files inside.
- LINUX 967 2024-07-23 13:50:31
-
- Describe in detail the VIP and DIP cross-segment examples of LVS-DR
- In daily application environment, we will encounter such a lvs deployment environment. All DRs and rsservers are in a LAN environment, but there is only one public network IP, and the application needs to be published to the Internet. We all know lvs The best model is that all servers have a public network IP, but in many cases public network resources are scarce. When there is only one public network IP, how to release LVS to the outside world? 1. Experimental topology 2. Overall environment 3. Detailed configuration Router configuration eth0: Public network IP access INTERNETeth1: 172.18.68.10 (public network IP) # Use 172.18.68.10 as public network IPeth2 in the experimental environment:
- LINUX 377 2024-07-23 13:46:30
-
- rpm management: Linux server software package query, uninstallation and installation guide
- Article Table of Contents 1. rpm management (key points): software query, uninstallation, installation function: The function of rpm is similar to products such as "Software Management" in Laptop Manager on Windows and "Software Manager" on Security Guard. Its main function is to monitor Linux servers. Perform corresponding management operations on the software packages on the system. The management is divided into: query, uninstallation, and installation. 1.1 Query the installation status of a certain software: #rpm-qa|grep keyword options: -q: query, query-a: all, all Case: Query whether firefox1.2 is installed on linux Uninstall a certain software #rpm-e software When Maxthon is uninstalled, it is a Linux text editor that has no dependencies, so it can be uninstalled directly. However
- LINUX 1041 2024-07-23 12:13:09
-
- The difference between threads and processes: A process is the basic unit for allocating resources, and a thread is an independently running control flow.
- Thread: It is a single sequence of control flow in the process. It is collectively called lightweight processes. A thread is the smallest unit that the operating system can perform calculation scheduling. It is included in the process and is the actual operation unit in the process. A thread refers to the process. In a single sequence of control flow, multiple threads can run concurrently in a process, and the threads can be kernel threads scheduled by the operating system kernel. Multiple threads in the same process will share all system resources in the process, such as virtual address space, file descriptors, signal processing, etc. However, multiple threads in the same process have their own call stacks, their own register environment, their own Thread local storage. The difference between threads and processes is: Generally, a process can contain multiple threads linu
- LINUX 1060 2024-07-23 10:57:54
-
- Linux schedules automatic deletion of files in a directory at regular intervals
- To achieve scheduled deletion of all files in a directory, you need to use the Linux crontab command, which can be achieved with a shell script. For example, to delete all cache files under /tmp, the operation is as follows: [root@localhost~]#vi/etc/init.d/delete.sh Press i and copy the following content to the delete.sh file, then press shift+: enter wq Save and exit. #!/bin/bashdir=/tmp//The directory name to be cleared files=`ls${dir}`forfilein$filesdoif[-e${dir}/${file}];thenrm-f${
- LINUX 841 2024-07-23 09:50:25
-
- Teach you how to add fonts to Fedora in 5 minutes
- System-wide installation If you install a font system-wide, it will be available to all users. The best way to do this is to use RPM packages from the official software repositories. Before starting, open the "Software" tool in Fedora Workstation, or other tools using the official repository. Select the "Add-ons" category in the selection bar. Then select "Fonts" within the category. You'll see the available fonts similar to the ones in the screenshot below: When you select a font, some details will appear. Depending on several scenarios, you may be able to preview some sample text for the font. Click the "Install" button to add it to your system. Depending on system speed and network bandwidth, this process may take some time to complete
- LINUX 466 2024-07-23 09:45:50
-
- Linux device driver model
- Table of Contents - Linux environment variables, device driver model 1. The origin of the Linux device driver model First review the usual process of device driver compilation [1] Implement the entry function module_init() and the module uninstall function module_exit(); [2] Apply for a device number, register_chrdev ();-----> (related to the kernel) [3] Use the udev/mdev mechanism to create device file nodes class_create(), device_create();------> (related to the kernel) [4] Hardware initialization: 1. io resource mapping ioremap(), the kernel provides gpio library function; 2. Note
- LINUX 581 2024-07-22 18:54:35
-
- Master explains how to modify the mariadb database storage path in Centos7.3
- If you don’t know the current database path, you only need to enter the following command to view it: Enter your mariadb password and press Enter #mysql-uroot-p Enter the following command to display the path calling status of various mariadb. The datadir item is the currently stored path. MariaDB[(none)]>showvariableslike‘%dir%’;Exit the database login state MariaDB[(none)]>exit;Stop the database#systemctlstopmysql.serverCreate a new mariadb storage path folder#mkdir-p/home/mysql
- LINUX 815 2024-07-22 15:01:11