---
title: 优化启动时间
description: "Ubuntu22.04 TLS 开机在“A start job is running for wait for network to be Configured”运行阶段需要等待很久，导致开机时间过长。"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Appendices/faq/faq_0036.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Appendices/faq/faq_0036.html
indexId: e2d2865f01121e586831aa055ed8322e7c0e6c6c35eff7a3d4777b324aa38aac74
---
# 优化启动时间

#### 现象描述

Ubuntu22.04 TLS 开机在“A start job is running for wait for network to be Configured”运行阶段需要等待很久，导致开机时间过长。


#### 解决方案

1. 远程登录开发者套件后，执行命令打开以下文件。

```
vi /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service
```


2. 在“[Service]”节点下面添加“TimeoutStartSec=1sec”，保存并退出，示例如下：

```
[Unit]
Description=Wait for Network to be Configured
Documentation=man:systemd-networkd-wait-online.service(8)
DefaultDependencies=no
Conflicts=shutdown.target
Requires=systemd-networkd.service
After=systemd-networkd.service
Before=network-online.target shutdown.target
[Service]
Type=oneshot
ExecStart=/lib/systemd/systemd-networkd-wait-online
RemainAfterExit=yes
TimeoutStartSec=1sec
[Install]
WantedBy=network-online.target
```


  优化后reboot启动时长可以缩短到1分钟以内。
