?
Solved

How do I start a new developed application in root?

Posted on 2011-03-10
4
Medium Priority
?
276 Views
Last Modified: 2012-06-27
Dear,

I am using debian OS and I have an application saved in a specicific folder lets say ./myfolder/myapp.cpp

I make exe_myapp in the same folder.

I need this application (exe_myapp) to be started in the root. HOW?




0
Comment
Question by:nabilhammoud
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 9

Accepted Solution

by:
expert_tanmay earned 600 total points
ID: 35093225
Start a terminal command prompt.
type the commands on the terminal as follows
> su
password : <put the root password>
#cd your_folder
#./exe_myapp

thats it
Cheers..
0
 
LVL 6

Assisted Solution

by:LeeeRussell
LeeeRussell earned 200 total points
ID: 35093469
It can be safer in linux to not stay logged in as the superuser an only execute a single command as su.  This can be done using sudo.  In your example you would type in:

sudo ./exe_myapp

and then the system will ask for your password.

Sudo for debian is explained here:

http://www.debianhelp.co.uk/sudo.htm
0
 
LVL 6

Assisted Solution

by:Ferrosti
Ferrosti earned 200 total points
ID: 35094040
Having the program in '/' is no good.
You should be able to place your program nearly anywhere. In your code change your working directory to '/' when needed.

C-Code:
int chdir (const char *filename)
0
 

Author Closing Comment

by:nabilhammoud
ID: 35136027
THX
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month9 days, 9 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question