本文介绍了如何在启动时运行命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图弄清楚如何在启动时运行命令,就像我在控制台中键入命令一样.我在我的Raspberry Pi上使用了Rasbian,但我认为这个问题对于Debian来说通常是相同的.我要运行的命令是:
I'm trying to figure out how to run a command at boot, like I would type it into the console. I'm using Rasbian with my Raspberry Pi, but I think this question is the same for Debian in general. The command I'm trying to run is:
sudo screen mono server.exe我尝试了以下解决方案,但是由于我刚开始使用Linux,所以不确定是否正确.
I tried the following solution, but since I just started with Linux, I'm not sure if this is correct.
#! /bin/sh # /etc/init.d/server ### BEGIN INIT INFO # Provides: server # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Simple script to start a program at boot # Description: .. ### END INIT INFO # If you want a command to always run, put it here sudo screen mono server.exe exit 0推荐答案
简单 运行cd ~ 然后编辑.profile 在底部,放任何您想要的东西.
Simple Run cd ~ Then edit .profile At the bottom, put whatever you would like.
更多推荐
如何在启动时运行命令?
发布评论