centos

CentOS Dolphin网络配置详解

小樊
48
2025-10-07 06:16:36
栏目: 智能运维

Note: “CentOS Dolphin” typically refers to CentOS 8/Stream 8 (or later) with the KDE Plasma Desktop Environment (where Dolphin is the default file manager). Network configuration in this context involves system-wide network settings (managed by NetworkManager) rather than Dolphin-specific configurations. Below is a detailed guide to system network configuration, which Dolphin relies on for network access.

1. Prerequisites

2. Method 1: Using Command-Line Tools

2.1 View Current Network Configuration

2.2 Configure Static IP Address (Persistent)

2.3 Restart Network Services

2.4 Configure DHCP (Automatic IP)

3. Method 2: Using Graphical Tools (nmtui)

For users preferring a GUI, nmtui (NetworkManager Text User Interface) is available:

  1. Open the terminal and run:
    sudo nmtui
    
  2. Navigate to “Edit a connection” (use arrow keys) and select your interface (e.g., ens33).
  3. Choose “Edit” and configure:
    • IPv4 Configuration: Select “Manual”.
    • Enter IP, Netmask (or Prefix), Gateway, and DNS servers.
  4. Click “OK” to save, then “Back” to exit.
  5. Restart the network service:
    sudo systemctl restart NetworkManager
    

4. Method 3: Using nmcli (Command-Line Tool)

nmcli is a powerful CLI for NetworkManager:

  1. List existing connections:
    nmcli connection show
    
  2. Edit the desired connection (replace ens33 with your connection name):
    sudo nmcli connection edit ens33
    
  3. Configure static IP:
    set ipv4.addresses 192.168.1.100/24
    set ipv4.gateway 192.168.1.1
    set ipv4.dns "8.8.8.8,8.8.4.4"
    set ipv4.method manual
    
  4. Save and activate:
    save
    activate
    
  5. Verify:
    nmcli connection show ens33 | grep IPV4
    

5. Verify Network Connectivity

After any configuration change, use these commands:

6. Troubleshooting Common Issues

By following these steps, you can configure system-wide network settings for CentOS 8/Stream 8 (with KDE Plasma). Dolphin will automatically use these settings for network access.

0
看了该问题的人还看了