# Packetbeat not working in Linux (requires sudo)

**URL:** https://discuss.elastic.co/t/packetbeat-not-working-in-linux-requires-sudo/42888
**Category:** Beats
**Tags:** packetbeat
**Created:** [February 26, 2016, 6:51pm UTC](https://discuss.elastic.co/t/packetbeat-not-working-in-linux-requires-sudo/42888 "2016-02-26T18:51:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rbkumar88](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@rbkumar88](https://discuss.elastic.co/u/rbkumar88)
#### Post date: [February 26, 2016, 6:51pm UTC](https://discuss.elastic.co/t/packetbeat-not-working-in-linux-requires-sudo/42888/1 "2016-02-26T18:51:47Z")

</div>

```auto
bash-4.1$ ./packetbeat devices -v -debug
bash-4.1$ uname -a
Linux xxxxxx 2.6.32-573.3.1.el6.x86_64 #1 SMP Mon Aug 10 09:44:54 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

```

Packetbeat coming out immediately without executing/displaying.

---

<div class="post-metadata">

### Author: ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)
#### Post date: [February 26, 2016, 6:55pm UTC](https://discuss.elastic.co/t/packetbeat-not-working-in-linux-requires-sudo/42888/2 "2016-02-26T18:55:53Z")

</div>

> [@rbkumar88](#):
>
> bash-4.1$ ./packetbeat devices -v -debug

Try:

```auto
$ ./packetbeat -devices

```

---

<div class="post-metadata">

### Author: ![rbkumar88](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@rbkumar88](https://discuss.elastic.co/u/rbkumar88)
#### Post date: [February 26, 2016, 7:00pm UTC](https://discuss.elastic.co/t/packetbeat-not-working-in-linux-requires-sudo/42888/3 "2016-02-26T19:00:42Z")

</div>

Hi Andrew,

Thanks that worked. But only if I use root user.

```auto
[root@xxxpacketbeat-1.1.1-x86_64]# ./packetbeat -devices
0: eth0 (No description available)
1: eth1 (No description available)
2: any (Pseudo-device that captures on all interfaces)
3: lo (No description available)

```

So is it always that packetbeat have to be run as a root user and not using any other user

I see this when I run using non-root user

```auto
bash-4.1$ ./packetbeat -devices
No devices found. You might need sudo?

```

thanks

---

<div class="post-metadata">

### Author: ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)
#### Post date: [February 26, 2016, 7:13pm UTC](https://discuss.elastic.co/t/packetbeat-not-working-in-linux-requires-sudo/42888/4 "2016-02-26T19:13:35Z")

</div>

Generally you need to be a privileged user to capture packets. On some distros there are ways of adding [capabilities](http://linux.die.net/man/7/capabilities) to a binary so that unprivileged users can run them. See [http://www.andy-pearce.com/blog/posts/2013/Mar/file-capabilities-in-linux/](http://www.andy-pearce.com/blog/posts/2013/Mar/file-capabilities-in-linux/)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 5, 2017, 9:55pm UTC](https://discuss.elastic.co/t/packetbeat-not-working-in-linux-requires-sudo/42888/5 "2017-07-05T21:55:21Z")

</div>


