I am trying to append text to the /boot/config.txt file but for some reason this is not working with the latest Raspbian(2016年05月27日)
pi@raspberrypi:~ $ sudo echo 'dtoverlay=pi3-miniuart-bt' >> /boot/config.txt
-bash: /boot/config.txt: Permission denied
Any clues why this is not working or is there another way to append text to a file?
asked Aug 3, 2016 at 7:54
1 Answer 1
The redirection takes place before sudo takes effect.
Try something like
sudo sh -c "echo 'dtoverlay=pi3-miniuart-bt' >> /boot/config.txt"
answered Aug 3, 2016 at 7:59
lang-bash