LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash: userdel: command not found (https://www.linuxquestions.org/questions/linux-newbie-8/bash-userdel-command-not-found-313859/)

dwdrumrboy 04-16-2005 10:48 AM

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

masand 04-16-2005 10:53 AM

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

dwdrumrboy 04-16-2005 11:02 AM

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

masand 04-16-2005 11:22 AM

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

dwdrumrboy 04-16-2005 11:29 AM

[xts2@localhost ~]$ rpm -qa|grep net-tool
net-tools-1.60-37

Thanks

masand 04-16-2005 11:35 AM

what do u get for

/sbin/ifconfig


regards

dwdrumrboy 04-16-2005 11:37 AM

[xts2@localhost ~]$ cd /sbin/ifconfig
bash: cd: /sbin/ifconfig: Not a directory
[xts2@localhost ~]$

Thanks

masand 04-16-2005 11:42 AM

no no..

try running this command

/sbin/ifconfig

regards

dwdrumrboy 04-16-2005 11:45 AM

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)

masand 04-16-2005 11:47 AM

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

regards


All times are GMT -5. The time now is 10:19 PM.