LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-02-2014, 09:40 AM   #1
mintvx
Member
 
Registered: Aug 2014
Distribution: Debian 7.0
Posts: 100

Rep: Reputation: Disabled
/opt directory


I used su command from terminal when install (configure and make) package. The package installed into /opt directory (as optional application software package). The package present in /opt directory in user account and root account both: is that as it should be, or it should not be in root account? As I wanted install it into the user account.

Last edited by mintvx; 10-02-2014 at 09:42 AM.
 
Old 10-02-2014, 10:37 AM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 2,380

Rep: Reputation: 603Reputation: 603Reputation: 603Reputation: 603Reputation: 603Reputation: 603
The /opt directory has nothing to do with the user accounts, user accounts are are usually in /home/USERNAME except for roots home which is in /root, stuff in /opt is visible to anyone on the system, if you wanted to just install for an individual user then install into /home/USERNAME, replacling USERNAME with the real user name of course.
 
1 members found this post helpful.
Old 10-02-2014, 11:49 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,621

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
Quote:
I used su command from terminal when install (configure and make) package
"su" (switch user → to root) is for administrative tasks only.
Do not use root for ./configure, make !
Only for 'make install' to /usr/ , /opt/.


If you want the application to install to /home/<username>/(any-folder),
example :

$ ./configure --prefix=/home/mintvx/a/ && make && make install

-
 
Old 10-02-2014, 02:53 PM   #4
mintvx
Member
 
Registered: Aug 2014
Distribution: Debian 7.0
Posts: 100

Original Poster
Rep: Reputation: Disabled
when use "su", is it possible that system not ask password, so that to use "su" as prefix: "su make install", instead of typing "su", then password, then command?

When command require root privileges, I just open terminal and log in as root, type commands, then log out when finished. That's probably wrong, but don't know what is better method.

Last edited by mintvx; 10-02-2014 at 02:58 PM.
 
Old 10-02-2014, 03:15 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,621

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
← #4 .

You can type $ su -c make install
... and you will of course be asked for Password.


You are not "logging in as root" with 'su' + password :
You are still "user" only, but with permissions like root.

-
 
1 members found this post helpful.
Old 10-02-2014, 06:23 PM   #6
mintvx
Member
 
Registered: Aug 2014
Distribution: Debian 7.0
Posts: 100

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
← #4 .

You can type $ su -c make install
... and you will of course be asked for Password.


You are not "logging in as root" with 'su' + password :
You are still "user" only, but with permissions like root.

-
Just find that proper way is to place command in quotes:
Code:
$ su -c 'apt-get update'
or it gives error.
 
Old 10-02-2014, 08:13 PM   #7
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Why not make user part of /etc/sudoers
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to create directory under /opt suddublr Linux - Newbie 7 12-02-2011 10:11 AM
Cannot access software installed in /opt/ directory...why? anjanu Linux - Software 7 09-28-2011 04:51 AM
Newbie as they come and how do I get an ansic directory to appear in /opt hpux2Linux Linux - Newbie 6 07-14-2009 04:00 PM
Use of the /opt directory - Suse 9.2 swamprat Linux - Software 2 02-17-2006 03:42 PM
regarding /opt directory... zameer_india Linux - Newbie 2 01-19-2005 12:48 AM


All times are GMT -5. The time now is 02:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration