aireplay-ng command not found
It's most likely a issue with your $PATH
if it works as root
but does not as normal user (aireplay-ng
is installed in an sbin
-directory, which normally only appears in $PATH
when logged in as root
). This is on purpose, though, since you need special privileges to run aireplay-ng
(you want to fiddle with your network card, though, which shouldn't be possible for every normal user, should it?).
Related videos on Youtube
Comments
-
ewizard over 1 year
I just downloaded and installed Kali Linux on my MacBook Pro (dual boot) to mess around with penetration testing - I have experience with aircrack-ng, but it was a while ago (and I was at least unaware of the distributions geared towards penetration testing). Finally got everything up and running, and customized the way I want - I tried to run the basic injection test
aireplay-ng -9 wlan0
in the terminal and I getcommand not found
when I try it as admin. The weird thing is it seems to work as root (I didn't try running the test - I just typed inaireplay-ng
to see if it recognized the command, and it does). I don't think it is a PATH problem, but I added/usr/sbin/aireplay-ng
to/root/.bashrc
like this (just incase):PATH=~/usr/sbin/aireplay-ng:$PATH
I don't think it is the path, because - as you can see, aireplay-ng is located in
/usr/sbin/
which is already part of my PATH variable (noticeable when I executeecho $PATH
).The odd part is - when I log in as root, it seems to work - I didn't actually run the test as root (probably not the best idea), but I did type in
aireplay-ng
to see if the command was recognized, and it was. Not sure if a symlink would help - but I'm not going to try anything until I get a response.Just trying to get the aireplay-ng command recognized. Thanks in advance.
-
ewizard about 10 yearsthanks! and yes i do like fiddling lol - so you are saying that i am supposed to run these tests as root? i thought that might be a bad idea (usually doing anything as root is frowned upon lol).
-
ewizard about 10 yearsyou are right about path! just did
echo $PATH
as normal user and sbin isnt there - how do i change this for this user? -
Andreas Wiese about 10 yearsYou could modify your shell's startup files (
~/.bashrc
forbash
,~/.zshrc
forzsh
), but I guess this won't help. I think you'd have to runaireplay-ng
asroot
. -
ewizard about 10 yearsok - i guess there isnt a problem - thanks for your help!