sudo stands for Super User Do; it allows you to run as another user, usually the super user (root), to carry out administrative tasks, such as update the software, change filesystems, and start daemons.
root has the ultimate power and can run pretty much anything. It can, therefore, do a lot of damage to your system and in the worst case, you will have to ...
To clarify a bit: There are no "sudo commands", there are only commands that need root privileges to operate correctly and sudo is the command to obtain them for one command: sudo simply runs the given command as root (read "sudo" as the imperative sentence "superuser, do something!"). The rules about which users may do this are written down in /etc/sudoers. ...
Jessie Lite does not contain the GUI packages just the command line. If you want a GUI you will need to install the packages to your existing SD card or reflash the card with the full Raspbian Jessie. The latter is probably the better approach. Note though that this may require a bigger SD card than you are currently using.
Ensure terminal over serial is disabled in raspi-config
and in "Advanced" choose "Serial" (Enable/Disable shell and kernel messages on the serial connection) and disable it.
Steps 2 and 3 should not be necessary if you do this step first, but in case it didn't work - check them also.
Ensure /boot/cmdline.txt has no ttyAMA0
This is what I did for a basic "no DE (desktop environment)" setup. There are probably better posts out there for specfic DEs. But this post seems to be about simple Xorg setup and being able to run it on the command-line using startx. For my tests, I used a fresh "Raspbian Jessie lite". The packages I installed:
sudo apt-get --no-install-recommends install ...
The shell interprets and handles redirection before the command is executed. So the redirection (>/sys/class/leds/led0/trigger) is attempted with the user's permissions, thus fails.
The generally recognized solution is to use the tee command: (man page and wikipedia)
echo heartbeat | sudo tee /sys/class/leds/led0/trigger >/dev/null
The tee command ...
It's a good idea to use visudo to edit the sudoers file. It will prevent you from saving the file with errors.
The easiest way to fix it will be to mount the SD card on a linux PC (or use a live cd) and fix the file there
You need to use
instead of sudo!!. This is intended behaviour. The !! history expansion, as stated in the documentation:
designates the preceding command. When you type this, the preceding command is repeated in toto.
It is simply as if !! were replaced with a find/replace with the contents of the last line. Naturally, since your line didn't ...
All the repository URL's are in the apt source files.
The main source file is /etc/apt/sources.list. You can edit the file with e.g. nano to remove the offending 'etcher' line(s):
sudo nano /etc/apt/sources.list
You also need to check the 'secondary' list files. That is any .list file in directory /etc/apt/sources.list.d/. You should find e.g. raspi.list ...
Yes, you can configure sudo to only allow the user to run certain commands with additional privileges. You can changed this in your /etc/sudoers file, but it's advisable not to do this directly but use sudo visudo command for this.
In default system installation you should find such line:
pi ALL=(ALL) NOPASSWD: ALL
It tells sudo to allow user pi to run ...
Looks like it's trying to use IPv6. I bet your connection doesn't have IPv6 (yet).
Make a config file that disables IPv6.
Run the command sudoedit /etc/apt/apt.conf.d/99force-ipv4, put Acquire::ForceIPv4 "true"; in it then save it.
If you want a temporary solution, run apt-get -o Acquire::ForceIPv4=true update instead of just apt-get update to make it use ...
To run your program just add it to ~/.bashrc using sudo, as the pi user has sudoers permissions without password authentication already, this way the program will be started when you login.
What you can do instead to is create a service unit, is you are using arch on your pi just create a new systemd unit file in /etc/systemd/system and then enable it, the ...
Make sure you have
in your local /etc/ssh/ssh_config
Now the problem is that when you sudo, you don't have the right credentials in .Xauthority. The -E option preserves your environment
$ sudo -E gparted
As explained by lornix it's because the shell handles redirection before the command is executed.
I prefer this type of invocation
sudo sh -c "echo 4 >/sys/class/gpio/export"
In your case
sudo echo heartbeat >/sys/class/leds/led0/trigger
sudo sh -c "echo heartbeat >/sys/class/leds/led0/trigger"
I definitely think this has to do with your PATH. An easy way to check this is to compare the output of echo $PATH with the output of sudo echo $PATH. If the node.js directory is present in the first but not in the second, there is something going on with your PATH setup.
The reason for this is that sudo does not actually load the root profile. Rather, it ...
This is easy. By default the stfp-server of a Raspberry Pi is located at: /usr/lib/sftp-server, so we need to get WinSCP to execute it with sudo.
Go to your WinSCP profile (Session > Sites > Site Manager)
Click on Edit > Advanced... > Environment > SFTP
Insert sudo su -c /usr/lib/sftp-server at "SFTP Server"
Save and connect
Init services run as root. Do not include sudo in service files run by init, regardless of whether it is SysV or systemd.
I would try [but please see comments, this is a bit personal preference]:
Then in /home/pi/...
Eventually, it might be easier to get rid of your current installation based on your linked guide and try to follow the very simple steps offered by Adafruit.
Works very nicely and you'll get the latest node.js (v0.10.35) installed.
It is impossible to know from the detail you supplied, but rather then being an OS problem it is more likely to be a power supply issue.
WiFi adaptors, in particular, draw quite a lot of current. Unfortunately (due IMHO to a design flaw in the Pi) the Pi is not capable of meeting the current requirements of the USB specification. This often exhibits as ...
Commands in the rc.local file are normally run as the root user anyway, so you don't really need the 'sudo' part of the command.
You may need to explicitly specify where your python interpreter is though, and you will certainly need the full path to your script.
and use the result from that command to update your rc.local file. The ...
The vulnerability described in that article sounds like a complete and total disaster that Apple should be hussling to fix ASAP.
However, it obviously won't work on GNU/Linux including Raspbian. With regard to resembling the issue of the default privileges given to Raspbian's pi user, I'll point out two very significant differences:
The pi user in /etc/...
Ok I am giving a shot at this, try following the mentioned steps (type in your Terminal):
create a folder called 'lxsession' in your hidden folder called .config:
$ mkdir /home/pi/.config/lxsession
Depending on your Raspberry Pi Version you can try :
$ mkdir /home/pi/.config/lxsession/LXDE-pi/
$ mkdir /home/pi/.config/lxsession/LXDE/
now create a ...
As I don't think this exactly answers your question, I'd prefer to post this as a comment but I don't yet have the reputation to do so, my apologies.
Although this would be a great convenience, I feel like I should also warn you of potentially limiting your experience. Sure, aliasing the update/upgrade command to simply upgrade would make your work on this ...
Try these: sudo dpkg --configure -a & sudo aptitude update & sudo aptitude upgrade. aptitude can be swapped out for apt-get if aptitude isn't installed.
If the dpkg command fails, try running sudo rm /var/lock/dpkg/status and then touch a new one via sudo touch/var/lock/dpkg/status. Fixed another user's problem here: raspberrypi.org/phpBB3/viewtopic....
The error saying "Problem with MergeList /var/lib/..." indicates that the status file got corrupted for some reason, and so cannot be parsed. This status file contains information about installed deb packages, and thus needs to be carefully backed up.
In this case, since this is freshly installed Raspbian, you can safely remove the status file, and re-...
The steps below install PIXEL, the official Raspbian desktop environment included with the full version of Raspbian.
After installing Raspbian Lite, setup your password, enable ssh, configure Locale and network etc.
Ensure Raspbian is updated to the latest software.
The essential step is to install the Xorg Display Server
sudo apt-get install --no-install-...