溫馨提示×

Ubuntu vsftp自動啟動

小樊
35
2025-10-20 14:42:07
欄目: 智能運維

Setting Up Automatic Startup for vsftpd on Ubuntu

1. Install vsftpd (if not already installed)

To begin, ensure vsftpd is installed on your Ubuntu system. Open a terminal and run the following commands to update your package list and install vsftpd:

sudo apt update
sudo apt install vsftpd

During installation, Ubuntu automatically starts the vsftpd service.

2. Verify the Service Status

After installation, check if vsftpd is running using:

sudo systemctl status vsftpd

A successful output will show active (running) under the “Active:” section, confirming the service is active.

3. Enable Automatic Startup at Boot

To configure vsftpd to start automatically when your Ubuntu system boots, use the enable command with systemctl:

sudo systemctl enable vsftpd

This command creates a symbolic link between the vsftpd service file and the system’s startup targets, ensuring the service launches at boot.

4. (Optional) Disable Automatic Startup

If you need to prevent vsftpd from starting automatically in the future, use the disable command:

sudo systemctl disable vsftpd

This removes the symbolic link created in Step 3.

5. Additional Notes on Service Management

  • Start/Stop the Service Manually: Use sudo systemctl start vsftpd to start the service immediately or sudo systemctl stop vsftpd to stop it.
  • Restart the Service: To apply configuration changes (e.g., edits to /etc/vsftpd.conf), restart the service with sudo systemctl restart vsftpd.
  • Check Startup Logs: If the service fails to start, inspect logs using journalctl -u vsftpd to identify errors.

By following these steps, you ensure vsftpd starts automatically with your Ubuntu system, maintaining consistent FTP service availability.

0
亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女