Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Linux ‘su’ these are popular real life examples

Using ‘su’ command-If user only uses ‘su’ Command and want to use ‘su’ as ‘sudo’ then it can be done. (here root Password is assumed to have been configured because user is familiar with ‘su’).

To achieve same sudo functionality to execute any single command user has to use ‘-c’ option of ‘su’. Here is a command given below how to do it. Read additional ‘su’ information here.

Whereas with ‘sudo’ command is highly useful when you did not set any password for root directory.

$ su -c apt-get install vlc
After hitting enter user will be prompted for password and obviously it’s for root password because we’re using ‘su’ command.
If you have already configure the password, then after dollar prompt just type ‘su’ to enter into root directory. But it needs password.
linuxandubuntu@sandy:~$ su
The Linux command ‘su’ is used to switch from one account to another. User will be prompted for the password of the user switching to.
$ su linuxandubuntu
password:
linuxandubuntu@sandy:~$
Users can also use it to switch to root account. If user types only ‘su’ without any option then It will be considered as root and user will be prompted to enter root user password.

Filed under: Linux Tagged: Linux su command, Popular UNIX or Linux commands


This post first appeared on Srinimf - Tech.Jobs.Biz.Success, please read the originial post: here

Share the post

Linux ‘su’ these are popular real life examples

×

Subscribe to Srinimf - Tech.jobs.biz.success

Get updates delivered right to your inbox!

Thank you for your subscription

×