Week5 Permission Help Admin
Week5 Permission Help Admin
$ chmod [options]
filename(s)
CHMOD COMMAND
24
…
CHMOD COMMAND
(CONT’D)
25
Permission Mapping
Octal Binary File Mode
0 000 ---
1 001 --x
2 010 -w-
3 011 -wx
4 100 r--
5 101 r-x
6 110 rw-
7 111 rwx
PERMISSION
22
$ > foo.txt
$ ls -l
foo.txt
CHMOD COMMAND
(CONT’D)
26
$ chmod 6 private.txt
Example:
$ chmod u=rw,go=-rw
private.txt
CHMOD COMMAND
(CONT’D)
28
30
Default setting:[root@hostname
root]#
hostname:
name of computer the
system administrator logged in to
May simply be localhost: refers to the local
computer
IMPORTANT
31
ps
list all processes (programs) that are running, along with their
process ID (PID)
uname
Uname command displays important information about the
system such as — Kernel name, Host name, Kernel release
number, Processor type, etc.,
Example:
uname -a
SOME ADMIN UTILITIES
df
Displays the file system disk space usage.
Example:
$ df -k (displays output in bytes)
$ df -h (human readable format)
top
top command displays the top processes in the system ( by
default sorted by cpu usage )
WHERE ARE THESE INFORMATION COMING
FROM?
33
…
If you examine the contents of /etc/passwd and
/etc/group , you will notice that besides the regular
user accounts there are accounts for the superuser
(uid 0) and various other system users.
Getting Help in UNIX/Linux
WHO COMMAND
4
Section Contents
1 User commands
2 Programming interfaces for kernel system calls
3 Programming interfaces to the C library
4 Special files such as device nodes and drivers
5 File formats
6 Games and amusements such as screensavers
7 Miscellaneous
8 System administration commands
MAN COMMAND
10