Linux Command Line and Shell Scripting Bible, 3rd ed (2015)
817 pág.

Linux Command Line and Shell Scripting Bible, 3rd ed (2015)


DisciplinaGnu/linux19 materiais373 seguidores
Pré-visualização50 páginas
Looking at global environment variables .....................................................136
Looking at local environment variables .......................................................138
Setting User-De\ufb01 ned Variables ............................................................................138
Setting local user-de\ufb01 ned variables ............................................................139
www.it-ebooks.info
xviii
Contents
ftoc.indd 12/08/2014 Page xviii
Setting global environment variables ..........................................................140
Removing Environment Variables ........................................................................142
Uncovering Default Shell Environment Variables ..................................................143
Setting the PATH Environment Variable ...............................................................148
Locating System Environment Variables ...............................................................150
Understanding the login shell process .........................................................150
Viewing the /etc/pro\ufb01 le \ufb01 le ..............................................................151
Viewing the $HOME startup \ufb01 les ........................................................154
Understanding the interactive shell process ................................................156
Understanding the non-interactive shell process ..........................................156
Making environment variables persistent ....................................................157
Learning about Variable Arrays ...........................................................................158
Summary ...........................................................................................................159
Chapter 7: Understanding Linux File Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Linux Security ...................................................................................................161
The /etc/passwd \ufb01 le ..................................................................................162
The /etc/shadow \ufb01 le ..................................................................................164
Adding a new user .....................................................................................164
Removing a user ........................................................................................168
Modifying a user .......................................................................................168
usermod ...........................................................................................169
passwd and chpasswd ........................................................................169
chsh, chfn, and chage .......................................................................170
Using Linux Groups ............................................................................................172
The /etc/group \ufb01 le ....................................................................................173
Creating new groups .................................................................................. 174
Modifying groups ......................................................................................175
Decoding File Permissions...................................................................................175
Using \ufb01 le permission symbols ....................................................................176
Default \ufb01 le permissions .............................................................................177
Changing Security Settings ................................................................................179
Changing permissions ................................................................................179
Changing ownership ..................................................................................181
Sharing Files .....................................................................................................182
Summary ...........................................................................................................184
Chapter 8: Managing Filesystems  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Exploring Linux Filesystems ...............................................................................187
Understanding the basic Linux \ufb01 lesystems ..................................................188
Looking at the ext \ufb01 lesystem ............................................................188
Looking at the ext2 \ufb01 lesystem ...........................................................188
Understanding journaling \ufb01 lesystems .........................................................189
Looking at the ext3 \ufb01 lesystem ...........................................................190
Looking at the ext4 \ufb01 lesystem ...........................................................190
Looking at the Reiser \ufb01 lesystem ........................................................190
www.it-ebooks.info
xix
Contents
ftoc.indd 12/08/2014 Page xix
Looking at the journaled \ufb01 lesystem ...................................................191
Looking at the XFS \ufb01 lesystem ............................................................191
Understanding the copy-on-write \ufb01 lesystems ..............................................192
Looking at the ZFS \ufb01 lesystem ............................................................192
Looking at the Btrfs \ufb01 lesystem ..........................................................192
Working with Filesystems ...................................................................................192
Creating partitions ....................................................................................193
Creating a \ufb01 lesystem .................................................................................196
Checking and repairing a \ufb01 lesystem ...........................................................198
Managing Logical Volumes ..................................................................................200
Exploring logical volume management layout ..............................................200
Using the LVM in Linux ..............................................................................201
Taking a snapshot .............................................................................202
Striping ...........................................................................................202
Mirroring .........................................................................................202
Using the Linux LVM ..................................................................................203
De\ufb01 ning physical volumes .................................................................203
Creating volume groups .....................................................................205
Creating logical volumes ....................................................................206
Creating the \ufb01 lesystem .....................................................................208
Modifying the LVM ............................................................................209
Summary ...........................................................................................................210
Chapter 9: Installing Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Package Management Primer ...............................................................................211
The Debian-Based Systems ..................................................................................212
Managing packages with aptitude ...............................................................212
Installing software packages with aptitude .................................................215
Updating