简体   繁体   English

Ubuntu - 在启动时运行命令

[英]Ubuntu - Run command on start-up

I would like to run 2 commands when Ubuntu starts up(before anyone even logs in)我想在 Ubuntu 启动时运行 2 个命令(甚至在任何人登录之前)

Also, these commands should be able to work, immediately after boot up.此外,这些命令应该能够在启动后立即工作。 So how do I do this?那么我该怎么做呢?

Navigate to /etc/ and run导航到 /etc/ 并运行

sudo nano rc.local

Place your commands below the comments, and above the command, "exit 0"将您的命令放在注释下方,在命令上方,“exit 0”

The commands should run on startup命令应该在启动时运行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM