Linux cheatsheet

Basic

Other

Permissions

1
2
owner(u) group(g) other(o)
d rwx rwx rwx owner group
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
number is made of 3 digits (octal, base 8):
U G O

4 = r
2 = w
1 = x

7 = rwx
6 = rw
5 = rx
4 = r
3 = wx
2 = w
1 = x
0 = 
1
2
3
4
5
6
7
Default file permissions
fedora (most common)
    Files:       644 = rw- r-- r--
    Directories: 755 = rwx r-x r-x
debian
    Files:       664 = rw- rw- r--
    Directories: 775 = rwx rwx r-x
1
docker:x:988:keven # group:password:gid:members

Time

1
2
3
4
5
6
7
mtime : modified time, last write
atime : access time, last read
    depends on mount options:
        relatime : update atime not every read
        noatime : don't update atime
ctime : change time, last metadata write or last data write
btime : creation/birth time, first created

Environment variables

SSH

Rsync

Network

Disk

Info

Kernel

Paths

Pipes

Redirect

Bash profile