Linked by Thom Holwerda on Thu 29th May 2008 17:04 UTC
Thread beginning with comment 316290
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
A technical nit pick. This is redundant. Do either:
$ su
passsord:
$ ifconfig eht1 up
$ dhclient eth1
or
$ sudo ifconfig eth1 up
$ sudo dhclient eth1
sudo let's you run a single command at a time as the super user and can be configured to do so without a password prompt
su let's you become the super user and doesn't need to be called via sudo. It's best to use su - or just set an alias in your shell config file for it so that you inherit root's environment.
the thread references kubuntu, which has root disabled by default. I will avoid debating the relative merits of sudo vs su but you can not use su alone on *buntu distros.
I would generally discourage doing "sudo su" but it is a way to get a root shell using root's settings in a system with root disabled.
"
$ sudo su
password:
$ ifconfig eth1 up
$ dhclient eth1
... fixes it.
$ sudo su
password:
$ ifconfig eth1 up
$ dhclient eth1
... fixes it.
A technical nit pick. This is redundant. Do either:
$ su
passsord:
$ ifconfig eht1 up
$ dhclient eth1
or
$ sudo ifconfig eth1 up
$ sudo dhclient eth1
"
A practical nit pick:
You have given two alternate ways which will work depending on whether or not there is a root account enabled.
My way works either way. If the "sudo su" fails because sudo is not installed, then su will work on its own.
If I don't know the details of the distribution, as was the case for the KDE 4.1 Virtual machine that I was using at the time ... then my approach is more universal.
Being universal makes it better for posting on forums.
Edited 2008-05-31 05:03 UTC





Member since:
2006-05-12
$ sudo su
password:
$ ifconfig eth1 up
$ dhclient eth1
... fixes it.
A technical nit pick. This is redundant. Do either:
$ su
passsord:
$ ifconfig eht1 up
$ dhclient eth1
or
$ sudo ifconfig eth1 up
$ sudo dhclient eth1
sudo let's you run a single command at a time as the super user and can be configured to do so without a password prompt
su let's you become the super user and doesn't need to be called via sudo. It's best to use su - or just set an alias in your shell config file for it so that you inherit root's environment.