I am confused by Raspbian network configuration. I'd like to edit /etc/network/interfaces
to setup the loopback interface to start automatically but I cannot find the configuration file.
root@raspberrypi:/# cat /etc/network/interfaces
cat: /etc/network/interfaces: No such file or directory
This is the content of /etc/network
:
root@raspberrypi:/# ls -al /etc/network
total 24
drwxr-xr-x 6 root root 4096 Jun 25 20:08 .
drwxr-xr-x 102 root root 4096 Jun 28 13:52 ..
drwxr-xr-x 2 root root 4096 May 6 23:16 if-down.d
drwxr-xr-x 2 root root 4096 May 6 22:38 if-post-down.d
drwxr-xr-x 2 root root 4096 May 6 22:38 if-pre-up.d
drwxr-xr-x 2 root root 4096 May 6 23:16 if-up.d
lrwxrwxrwx 1 root root 12 May 6 22:18 run -> /run/network
It's worth nothing that my Raspberry Pi automatically connects to the ethernet network and picks up an IP address via DHCP, so there must be some other piece of configuration elsewhere I cannot find.
Where is network configuration located in Raspbian? From some googling I'd say it's on /etc/network/interfaces
but what I see on my machine seems to suggest something different.
To add more information, this is my uname -a
output:
mario@raspberrypi ~ $ uname -a
Linux raspberrypi 3.18.11+ #781 PREEMPT Tue Apr 21 18:02:18 BST 2015 armv6l GNU/Linux
and this is the output of ps -ef
after I manually added /etc/network/interfaces
with the configuration I needed, which is working fine.
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 Jun28 ? 00:00:07 init [2]
root 2 0 0 Jun28 ? 00:00:00 [kthreadd]
root 3 2 0 Jun28 ? 00:00:03 [ksoftirqd/0]
root 5 2 0 Jun28 ? 00:00:00 [kworker/0:0H]
root 7 2 0 Jun28 ? 00:00:07 [rcu_preempt]
root 8 2 0 Jun28 ? 00:00:00 [rcu_sched]
root 9 2 0 Jun28 ? 00:00:00 [rcu_bh]
root 10 2 0 Jun28 ? 00:00:00 [khelper]
root 11 2 0 Jun28 ? 00:00:00 [kdevtmpfs]
root 12 2 0 Jun28 ? 00:00:00 [netns]
root 13 2 0 Jun28 ? 00:00:00 [perf]
root 14 2 0 Jun28 ? 00:00:00 [khungtaskd]
root 15 2 0 Jun28 ? 00:00:00 [writeback]
root 16 2 0 Jun28 ? 00:00:00 [crypto]
root 17 2 0 Jun28 ? 00:00:00 [bioset]
root 18 2 0 Jun28 ? 00:00:00 [kblockd]
root 19 2 0 Jun28 ? 00:00:47 [kworker/0:1]
root 20 2 0 Jun28 ? 00:00:00 [rpciod]
root 21 2 0 Jun28 ? 00:00:00 [kswapd0]
root 22 2 0 Jun28 ? 00:00:00 [fsnotify_mark]
root 23 2 0 Jun28 ? 00:00:00 [nfsiod]
root 29 2 0 Jun28 ? 00:00:00 [kthrotld]
root 30 2 0 Jun28 ? 00:00:00 [VCHIQ-0]
root 31 2 0 Jun28 ? 00:00:00 [VCHIQr-0]
root 32 2 0 Jun28 ? 00:00:00 [VCHIQs-0]
root 33 2 0 Jun28 ? 00:00:00 [iscsi_eh]
root 34 2 0 Jun28 ? 00:00:00 [dwc_otg]
root 35 2 0 Jun28 ? 00:00:00 [DWC Notificatio]
root 37 2 0 Jun28 ? 00:00:00 [VCHIQka-0]
root 38 2 0 Jun28 ? 00:00:00 [deferwq]
root 40 2 0 Jun28 ? 00:00:01 [mmcqd/0]
root 42 2 0 Jun28 ? 00:00:00 [jbd2/mmcblk0p2-]
root 43 2 0 Jun28 ? 00:00:00 [ext4-rsv-conver]
root 158 1 0 Jun28 ? 00:00:00 udevd --daemon
root 295 158 0 Jun28 ? 00:00:00 udevd --daemon
root 301 158 0 Jun28 ? 00:00:00 udevd --daemon
root 1547 1 0 Jun28 ? 00:02:05 /usr/sbin/ifplugd -i eth0 -q -f -u0 -d10 -w -I
root 1576 1 0 Jun28 ? 00:00:21 /usr/sbin/ifplugd -i lo -q -f -u0 -d10 -w -I
root 1633 1 0 Jun28 ? 00:00:00 dhclient -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases eth0
root 2067 1 0 Jun28 ? 00:00:00 /usr/sbin/rsyslogd -c5
root 2133 1 0 Jun28 ? 00:00:00 /usr/sbin/cron
102 2141 1 0 Jun28 ? 00:00:00 /usr/bin/dbus-daemon --system
avahi 2178 1 0 Jun28 ? 00:00:00 avahi-daemon: running [raspberrypi.local]
avahi 2179 2178 0 Jun28 ? 00:00:00 avahi-daemon: chroot helper
tp 2218 1 0 Jun28 ? 00:00:27 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 104:107
root 2245 1 0 Jun28 ? 00:00:00 /usr/sbin/sshd
nobody 2269 1 0 Jun28 ? 00:00:03 /usr/sbin/thd --daemon --triggers /etc/triggerhappy/triggers.d/ --socket /var/run/thd.socket --pidfile /var/run/thd.pid --user nobody /dev/input/event*
root 2302 1 0 Jun28 tty1 00:00:00 /sbin/getty --noclear 38400 tty1
root 2303 1 0 Jun28 tty2 00:00:00 /sbin/getty 38400 tty2
root 2304 1 0 Jun28 tty3 00:00:00 /sbin/getty 38400 tty3
root 2305 1 0 Jun28 tty4 00:00:00 /sbin/getty 38400 tty4
root 2306 1 0 Jun28 tty5 00:00:00 /sbin/getty 38400 tty5
root 2307 1 0 Jun28 tty6 00:00:00 /sbin/getty 38400 tty6
root 2308 1 0 Jun28 ? 00:00:00 /sbin/getty -L ttyAMA0 115200 vt100
root 2906 2 0 Jun29 ? 00:00:00 [kworker/u2:0]
root 3100 2 0 Jun29 ? 00:00:00 [kworker/0:0]
root 3578 2 0 17:17 ? 00:00:01 [kworker/u2:1]
mario 3628 1 3 20:50 ? 00:00:04 mosh-server new -s -c 8 -l LANG=en_GB.UTF-8 -l LC_CTYPE=en_GB.UTF-8
mario 3629 3628 1 20:50 pts/0 00:00:01 -bash
mario 3650 3629 0 20:51 pts/0 00:00:00 ps -ef
uname -a
andps -ef
to your question. – ifermon Jun 30 '15 at 17:30ps -ef
has been taken after I manually added/etc/network/interfaces
and everything is working as expected. I am still not sure about how everything could work earlier with that file missing – mariosangiorgio Jun 30 '15 at 20:56interfaces
also missing – dmkc Jul 01 '15 at 01:38