Linux / UNIX Tech Support Forum
This is a discussion on su -c within the CentOS / RHEL / Fedora forums, part of the Linux Distribution category; hi am a newbie on Linux.. we're testing a centos5.3 server edition here.. i saw a syntax on net to ...
Register free or login to your account to remove all advertisements.
|
|||||||
| CentOS / RHEL / Fedora Discussion about Redhat Enterprise Linux or CentOS or Fedora Linux related problems. |
![]() |
|
|
Thread Tools | Display Modes |
|
|||
|
hi am a newbie on Linux.. we're testing a centos5.3 server edition here.. i saw a syntax on net to use [su -c yum ....]
my question is... what does "-c" means.. hope for your patience if i seem to be so dumb.. as i ve said.. am a newbie.. thank you. |
|
|||
|
Using "-c" option with "su" you can pass a single COMMAND to the shell.
You can use --command=COMMAND as well. Last edited by harshana; 17th November 2009 at 02:50 PM. |
|
|||
|
pass single command to shell??? d'u mean only one command at a time.. ???
on a centos5.3 server, within the user X , i tried yum update > u need to be root to perform this command sudo 'yum update' > prompted a password. root password -not valid. with X password- X is not in the sudoers file...... su - root 'yum update' > -bash: yum update: no such file or directory su -c 'yum update' - it worked can u explain the result of each command i tried? again thank you for the patience.. |
|
|||
|
Yes,
to use SUDO you have to configure it for user X, here what you doing is running 'yum update' command as super user use of su -C, instead of that you can simply login to root(super user) by using "su" and run "yum update" ex: #su password : #yum update |
|
|||
|
nice one..
................ youll be reading more next time... i still have to reformat and reinstall centos in order for me to learn the "partitioning part" then configure it.. what packages to install and update... it would be helpful for me if ul suggest a nice site to read... hope for u 2 drop by and check on my posts every now and then.. |
![]() |
|
|
| Tags |
| centos, linux su -c run command, rhel, rhel su -c, rhel5, su command, su run command |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|