LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   not able to connect to the internet (https://www.linuxquestions.org/questions/linux-newbie-8/not-able-to-connect-to-the-internet-892928/)

SarahGurung 07-21-2011 06:39 AM

not able to connect to the internet
 
hi,
well i have broadband connection in my company and i wanted to connect my centos pc to the internet via this connection.how can i do this and even the ifconfig command isnt working.
somebody please help me..please give me some advanced commands as well...

colucix 07-21-2011 07:05 AM

The ifconfig command is available only to root, unless you use the absolute path that is:
Code:

/sbin/ifconfig -a
Regarding broadband connection you have to set-up it from System -> Preferences -> Network Connections -> DSL. Click the ADD button and fill all the required fields. Which release of CentOS have you installed anyway?

SarahGurung 07-21-2011 07:14 AM

hi,
well i have installed centos 5.6 in my pc..
and can u please tell me how can i change the mode of ifconfig from root to user because when i type ifconfig it isnt showing any result and it is controlled by root...please help me,centos is really making me mad..

sycamorex 07-21-2011 07:19 AM

Quote:

Originally Posted by SarahGurung (Post 4421130)
hi,
well i have installed centos 5.6 in my pc..
and can u please tell me how can i change the mode of ifconfig from root to user because when i type ifconfig it isnt showing any result and it is controlled by root...please help me,centos is really making me mad..

You can either type /sbin/ifconfig -a as a normal user or use 'su' to become root and you should be able to just type 'ifconfig -a'

colucix 07-21-2011 07:36 AM

In Centos 5.6 the procedure to set-up a DSL connection is different. From the System menu, go to Administration -> Network. Then click on the New button and select xDSL connection from the list on the left, click forward and insert username, password and provider's name.

Regarding the ifconfig command, the answer has been already told. Some commands in linux are reserved to the system administrator to avoid that normal users (in a multiuser system) can change or damage the system. So basically these command are placed in /sbin and /usr/sbin and these two directories are not in the PATH environment variable of a user. Anyway the command ifconfig can be used in some circumstances (only to retrieve network information) by normal users: the trick is to run the command using the absolute path (as shown above).

To see the difference in the PATH environment variable, first run
Code:

echo $PATH
as normal user, then switch to root using the command
Code:

su -
and run echo $PATH again.


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