File System Layout - Raspberry Pi A User Manual

Hide thumbs Also See for Raspberry Pi A:
Table of Contents

Advertisement

52
2.
3.
To explain what just happened: the command
mand you're typing should be run as if you were logged in as the root account. The
command says you want to create a new user account. The
option—tells the
his or her files. The big list following the
be a member.
Users and Groups
In Linux, each user has three main attributes: their User ID (UID), their Group ID (GID) and a
list of supplementary group memberships. A user can be a member of as many groups as
he or she pleases, although only one of these can be the user's primary group. This is usu-
ally a self-named group matching the user name.
Group membership is important. While users can be granted direct access to files and
devices on the system, it's more common for a user to receive access to these via group
membership. The group audio, for example, grants all members the ability to access the
Pi's sound playback hardware. Without that membership, the user won't be listening to any
music.
To see a user's group memberships, type groups username at the terminal. If you use
this on the default user pi, you'll see the list of groups any new member should join to make
use of the Pi. This is where the information used in step 2 of the preceding procedure was
found.

File System Layout

The content of the SD card is known as its file system and is split into multiple sections, each
with a particular purpose. Although it's not necessary for you to understand what each sec-
tion does in order to use the Raspberry Pi, it can be helpful background knowledge should
anything go wrong.
P A R T I
Type the following as a single line with no spaces after any of the commas:
sudo useradd -m -G adm,dialout,cdrom,audio,plugdev,users, ↵
lpadmin,sambashare,vchiq,powerdev username
This creates a new, blank user account.
To set a password on the new account, type
the new password when prompted.
program to create a home directory where the new user can store
useradd
C O N N E C T I N G T H E B O A R D
sudo passwd username
tells the operating system that the com-
sudo
-m
flag is the list of groups of which the user should
-G
followed by
useradd
section—known as a flag or an

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Raspberry pi b

Table of Contents