LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-16-2005, 10:48 AM   #1
dwdrumrboy
LQ Newbie
 
Registered: Mar 2005
Posts: 13

Rep: Reputation: 0
bash: userdel: command not found


In my quest of becoming proficient with bash and the terminal and reducing my reliance on the GUI, I wanted to delete a user and related directories, so I "man userdel" and userdel -r username is the syntax.

So, I su as root and issued the command and bash returns "bash: userdel: command not found".

Another question regarding bash in using "ifconfig". I though this would return my ip information - similiar to "ipconfig" in an MS environment. I am getting the message again of "command not found".

I queried the man pages, which tells me the commands are at least listed, but what am I doing incorrectly?

Any assistance would be greatly appreciated.

RHEL 4 WS - kernel 2.6.9-5.0.3.ELsmp

Thanks - dwdrumrboy
 
Old 04-16-2005, 10:53 AM   #2
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there

run

which ifconfig

this will tell u the location of the command ifconfig

like i get

root@gaurav:~ # which ifconfig
/sbin/ifconfig

then u can run that as

/sbin/ifconfig

regards
 
Old 04-16-2005, 11:02 AM   #3
dwdrumrboy
LQ Newbie
 
Registered: Mar 2005
Posts: 13

Original Poster
Rep: Reputation: 0
bash: userdel: command not found

Thanks - but here is the bash response

[root@localhost ~]# which ifconfig
/usr/bin/which: no ifconfig in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/xts2/bin)

Isn't this telling me ifconfig can't be found?

Thanks - dwdrumrboy
 
Old 04-16-2005, 11:22 AM   #4
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
if config is part of net-tools package

see that u have installed that rpm

what do u get for

rpm -qa|grep net-tool
 
Old 04-16-2005, 11:29 AM   #5
dwdrumrboy
LQ Newbie
 
Registered: Mar 2005
Posts: 13

Original Poster
Rep: Reputation: 0
[xts2@localhost ~]$ rpm -qa|grep net-tool
net-tools-1.60-37

Thanks
 
Old 04-16-2005, 11:35 AM   #6
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
what do u get for

/sbin/ifconfig


regards
 
Old 04-16-2005, 11:37 AM   #7
dwdrumrboy
LQ Newbie
 
Registered: Mar 2005
Posts: 13

Original Poster
Rep: Reputation: 0
[xts2@localhost ~]$ cd /sbin/ifconfig
bash: cd: /sbin/ifconfig: Not a directory
[xts2@localhost ~]$

Thanks
 
Old 04-16-2005, 11:42 AM   #8
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
no no..

try running this command

/sbin/ifconfig

regards
 
Old 04-16-2005, 11:45 AM   #9
dwdrumrboy
LQ Newbie
 
Registered: Mar 2005
Posts: 13

Original Poster
Rep: Reputation: 0
bingo! - many thanks

eth0 Link encap:Ethernet HWaddr 00:06:5B:BD:EF:95
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::206:5bff:febd:ef95/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:957739 errors:0 dropped:0 overruns:1 frame:0
TX packets:316780 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1377792811 (1.2 GiB) TX bytes:23975062 (22.8 MiB)
Interrupt:185 Base address:0xdc80

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2193 errors:0 dropped:0 overruns:0 frame:0
TX packets:2193 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3202984 (3.0 MiB) TX bytes:3202984 (3.0 MiB)
 
Old 04-16-2005, 11:47 AM   #10
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
it is just that /sbin is not in ur path so u need to be root to run this

regards
 
  


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
bash: command not found hamish Linux - Newbie 7 02-23-2011 04:28 PM
bash: g++: command not found m_lp_ql_m Linux - Software 8 07-08-2010 01:45 PM
-bash: ls: command not found jchun Linux - General 3 11-02-2004 10:11 AM
userdel command... should I run it? The_Nerd Linux - Software 2 09-12-2004 08:31 PM
bash: command not found jc80 Fedora 3 03-14-2004 03:11 PM


All times are GMT -5. The time now is 04:29 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration