execute command when Ubuntu boots up ?


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu execute command when Ubuntu boots up ?
# 1  
Old 08-30-2011
Debian execute command when Ubuntu boots up ?

hey all,,
I want to add comments when Ubuntu starts up..
now I know that there is a directory called /etc/init.d
which I can place my scripts there to run them at Ubuntu's startup..

but I prefer if there would be a file which runs when Ubuntu starts!!
because it is only one command. not worth to make a new file..


I tried .profile ,, but does not work..
regarding .bash_rc ,,, it runs commands each time I open the terminal.
and I want to run a command once!!

any suggestions?

thanks.
# 2  
Old 08-30-2011
Append the command to /etc/rc.local.
This User Gave Thanks to radoulov For This Post:
# 3  
Old 08-30-2011
thank you radoulovSmilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Another one line command where I'd like to determine if Ubuntu or Red Hat when running command

Hello Forum, I'm making very good progress on my report thanks to the very helpful people on this forum. I've been able to successfully create my report for my Red Hat servers. But I do have a few ubuntu servers in the mix and I'd like to capture some data from them when an ssh connection is... (8 Replies)
Discussion started by: greavette
8 Replies

2. Shell Programming and Scripting

Execute ssh command with additional terminal command to any remote user not working script

Hello i am having an issue with bash script and this is the code now=$(cat hosts1.txt | awk '{print $2;}') while read n ;do ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers' When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies

3. UNIX for Beginners Questions & Answers

Execute Ubuntu 14.04 cronjob as non-root

I have created a cronjob that successfully executes and among other thing runs aria2c to download several files and save them to a folder. However, since it executes as sudo, the downloaded folder is saved with those permissions. Is there a way to execute the cronjob so that the downloaded folder... (4 Replies)
Discussion started by: cmccabe
4 Replies

4. Shell Programming and Scripting

How to execute a command on each line of output from another command?

Hello :) new to bash not to programming. I have an on-going need to change the owning group on sets of files and directories from the one they were created with or changed to on update to the one they need to have going forward. find {target_root} -group wrong_group gets me a newline... (4 Replies)
Discussion started by: naftali
4 Replies

5. Shell Programming and Scripting

When i am trying to execute export command within a shell script it is saying command not found.

I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found" My code is as follows: -------------------------- #!/bin/sh user="test" DIR="/bldtmp/"$user VIEW="test.view1" echo "TMPDIR before export... (4 Replies)
Discussion started by: dchoudhury
4 Replies

6. OS X (Apple)

How to execute a command when system boots?

Hi all, I want to execute a command when system boots. I tried to edit /etc/rc.common and add my command at the end of rc.common, but it does not work! Anyone knows how to do it? Thanks :) (6 Replies)
Discussion started by: andrewust
6 Replies

7. UNIX for Dummies Questions & Answers

Plz Help : How to use write command to execute command on some other terminal

Hi Group , I m trying to execute commands on some other system using write command but inspite of executing the commands they r passed as simple messages. - i m writing >write user-id ! ls o ctrl-d inspite of executing the command ls,other terminal shows ! ls. Thnx in advance. (2 Replies)
Discussion started by: Aashish
2 Replies

8. UNIX for Advanced & Expert Users

AIX 433 boots into command line.

Hi All, I have an AIX 433 workstation that keeps booting into command mode. It was booting into CDE for a long time now. Suddenly now it boots into command line mode. No errors while booting up. Do not see anything in errpt. Don' t know where to start from.. Can any one please help me..thanks. ... (2 Replies)
Discussion started by: navinxavier
2 Replies

9. Solaris

NIS Boots Me Out

I have a NIS environment using all Solaris 9 systems. After all kinds of trobleshooting i am to the point where I can login to a NIS account from a client system. However, the logon process starts and the splash screen is displayed and then the desk top is displayed but then it flashes and kicks... (1 Reply)
Discussion started by: meyersp
1 Replies

10. UNIX for Advanced & Expert Users

program that boots at OS startup

Hi All: I wanted to know if i can write a program in UNIX, a program that does not run under a particular user login, but starts up at BOOT time. Are there any online material that i could look into to do that. Appreciate the help. Thanks, Preetham (6 Replies)
Discussion started by: preetham
6 Replies
Login or Register to Ask a Question