
Configuring a Static IP Address in Linux
ForUbuntu18.04 ,useNetplanbyeditingtheYAMLfilein/etc/netplan/tosetastaticIP,thenapplywithsudonetplanapply.2.OnsystemswithNetworkManager,usenmclitomodifytheconnectionwithstaticIP,gateway,andDNSsettings,thenrestarttheconnection.3.OnolderDebiansystems,e
Aug 04, 2025 am 06:58 AM
A Guide to the `journalctl` Command for Reading Linux Logs
journalctl is the main tool for managing systemd system logs, and it must be viewed using it instead of traditional text file methods. 1. Run journalctl to view all logs since the current startup, and use journalctl-f to track log output in real time. 2. You can filter the logs through time, such as --sincetoday to view today's logs, --since"1hourago" to view the logs in the past hour, and -b-1 to view the logs in the last startup. 3. You can filter by service, such as journalctl-ussh.service to view SSH service logs, combine -f to monitor NGINX logs in real time, or combine -
Aug 04, 2025 am 06:09 AM
How to view the logs for a specific service using journalctl?
To use journalctl to view the logs of a specific service, 1. You can specify the service name to filter the logs through the \_SYSTEMD\_UNIT parameter, such as journalctl\_SYSTEMD\_UNIT=sshd.service; 2. If the service name is not determined, you can use systemctllist-units-type=service to list all services; 3. Use the -f parameter to monitor the log output in real time, such as journalctl-f\_SYSTEMD\_UNIT=httpd.service; 4. Use the -n or -e parameter to limit the number of rows to display or jump to the latest log; 5. Use --boot-id or time range to monitor the log output; 4. Use the -n or -e parameter to limit the number of rows to display or jump to the latest log; 5. Use --boot-id or time range to limit the number of rows to display or jump to the latest log;
Aug 04, 2025 am 04:25 AM
How to Analyze System Logs on Linux for Troubleshooting
To effectively analyze Linux system logs, you must first master the location of key log files and use the correct tools for filtering and searching. 1. The main log is located in the /var/log directory, such as syslog, auth.log, kern.log, etc., and the system using systemd should view the logs through the journalctl command. 2. Use journalctl to view all logs (journalctl), real-time tracking (journalctl-f), filter by service (journalctl-ussh.service), view this startup log (journalctl-b), or only display errors and above-level messages (journalct
Aug 04, 2025 am 03:47 AM
Monitoring Linux System Metrics with Prometheus and Grafana
InstallNodeExporterontheLinuxservertocollectsystemmetrics.2.Configureitasasystemdservicetoexposemetricsatport9100.3.InstallPrometheusandconfigureittoscrapemetricsfromNodeExporterbyaddingthetargetIPinprometheus.yml.4.StartPrometheustobeginscrapingmetr
Aug 04, 2025 am 01:46 AM
Setting Up a Kubernetes Cluster on Bare-Metal Linux
To successfully set up a Kubernetes cluster on a bare metal Linux server, you must first prepare a machine that meets the requirements and complete the system configuration, then install containerd, kubeadm, kubelet and kubectl, then initialize the control plane node, install the CNI network plug-in, join the worker node, and perform verification. 1. Prepare at least 2-3 Linux servers with static IP, shut down swap, enable necessary kernel modules and sysctl parameters; 2. Install containerd on all nodes and configure SystemdCgroup=true; 3. Install kubeadm, kubelet and kubectl and mark as warranty
Aug 04, 2025 am 12:43 AM
How to Build and Install a Real-Time Linux Kernel
Areal-timeLinuxkernelisessentialforlow-latency,deterministicapplicationslikeaudioproduction,robotics,andhigh-frequencytrading,achievedbyapplyingthePREEMPT_RTpatchtoenablefullkernelpreemption.2.Preparethebuildenvironmentbyinstallingrequiredpackagessuc
Aug 04, 2025 am 12:26 AM
Automating System Tasks in Linux with Cron and Systemd Timers
Using cron is suitable for simple, frequent tasks and user-level automation because of its simple syntax and strong compatibility; 2. Using systemdtimes is suitable for system-level tasks, especially scenarios that require execution, integration of services or persistence and logging functions after system wake-up. Its advantage lies in better system integration and reliability. Select cron for lightweight timing tasks, and select systemdtimers for scenarios that require robustness and system perception. The two can coexist and be selected according to needs.
Aug 03, 2025 pm 04:14 PM
Getting Started with Bash Scripting for Linux Automation
Yes, you can start automating Linux tasks through Bash scripts. 1. Write a script file containing shebang (#!/bin/bash) and commands, save it and make it executable and run through chmod x; 2. Use variables (such as name="Alice") and read commands to obtain user input to improve script flexibility; 3. Use if condition judgment and for loop to achieve logical control, and automate repeated tasks such as backup or file processing; 4. Configure cron timing tasks through crontab-e, such as 02* to run daily backup scripts, and ensure that absolute paths are used or PATH environment variables are set; from small single-function scripts (such as cleaning temporary texts
Aug 03, 2025 pm 01:29 PM
Using SSH for Secure Remote Access to a Linux Machine
Install and start the SSH service, configure the /etc/ssh/sshd_config file to change the port, disable root login and restrict user access; 2. Use the sshusername@remote_host command to connect from the client, and add the -p parameter if the port changes; 3. Generate an SSH key pair and use ssh-copy-id to deploy the public key to the server to achieve password-free secure login; 4. Strengthen security by disabling password authentication, modifying the default port, using non-root users, restricting the user to deploy fail2ban, etc.; the SSH service needs to be restarted after each configuration, and ensure that the new configuration is tested avoids locked. After correctly setting SSH can provide efficient, encrypted and scriptable
Aug 03, 2025 pm 01:15 PM
How to Set Up a DNS Server on Linux Using BIND
InstallBINDusingthepackagemanager(aptforUbuntu/Debian,dnfforCentOS/RHEL).2.Configureglobaloptionsinnamed.conf.optionsornamed.conftoallowqueries,setforwarders(like8.8.8.8),enablerecursion,andlistenonallinterfaces.3.Setupaforwardzonebyaddingazoneentryi
Aug 03, 2025 pm 12:11 PM
How to Set Up a Basic Firewall with iptables on Linux
SetdefaultpoliciestoDROPforINPUTandFORWARDchainswhileallowingOUTPUT;2.Allowloopbacktrafficandblockspoofedlocalhostaddresses;3.Permitestablishedandrelatedconnectionsforresponsetraffic;4.AllowSSHonport22(andHTTP/HTTPSifneeded);5.Saverulesusingdistribut
Aug 03, 2025 am 11:51 AM
Understanding Linux I/O Schedulers
Thebestlinuxi/OschedulerDePendsontHestoragetypeRetWorkLoad: 1.Fornvme/PCIessds, UMEQ DEAD LINENONE; 2.FORSATASSDS, USEBFQORMQ-D Eadline; 3.Forhddssindesktops, Usebfqordeadline; 4.Forhddssinsordsordatabases, UsedEdinormq Deadline; 5.invirtualmachines, Useno
Aug 03, 2025 am 11:06 AM
Advanced Linux Networking Tools and Troubleshooting
UsetcpdumpandWiresharktocaptureandanalyzepacketsforconnectivityissues,filteringbyport,protocol,orTCPflags.2.Employmtrandtcptracerouteforaccuratepathanalysis,especiallyinfirewall-restrictedenvironmentsusingTCP-basedprobes.3.Replacelegacytoolswithipfor
Aug 03, 2025 am 07:35 AM
Hot tools Tags

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

vc9-vc14 (32+64 bit) runtime library collection (link below)
Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit
VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version
Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit
VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version
Chinese version, very easy to use
