Unix Reference
Kip Landergren
(Updated: )
My cheat sheet for working with Unix-like operating systems covering utilities, shell builtins, and frequently asked questions.
Contents#
- Unix Utilities
- Other Programs
- Shell builtins
- Shell Techniques
- Exit Codes
- Permissions
- XDG Base Directory Specification
- Frequently Asked Questions (FAQ)
- Terminology
Unix Utilities#
The following refer to BSD variants unless otherwise noted.
chown#
sudo chown postgres:daemon data
du#
Display disk usage statistics.
| -h | “human readable” | |
| -d DEPTH | -dDEPTH | display an entry DEPTH directories deep |
| -s | equivalent to: -d0 |
This form allows for easy modification of depth to aid investigation:
du -h -d0 path/to/dir
Use sort -h to sort by the human readable values:
du -h -d1 path/to/dir | sort -h
echo#
Write arguments to standard output.
Examples#
$ echo 'hello world'
hello world
$
$ echo -n 'hello world'
hello world$
$ echo 'hello\nworld'
hello\nworld
$ echo -e 'hello\nworld'
hello
world
env#
Set environment and execute command; or print environment
Often used with shebangs to delegate the finding of a correct interpreter to the environment (useful if my installation of ruby is different than yours):
#!/usr/bin/env ruby
file#
Determine file type.
% file foo
foo: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=redacted, stripped
find#
find [options] [path ...] [expression]
Walk a file hierarchy specified by one or more path arguments. Recursively descend each path and evaluate expression on each file. The evaluation of the expression typically determines whether or not to print the file.
An expression is composed of primaries and operators.
Group conditions within an expression with escaped parentheses.
Avoid inadvertent split errors by using -print0 in combination with xargs -0 for escaping output paths with ASCII NUL character.
Options#
| -X | for use with xargs; warns and skips files containing delimiting characters |
Primaries#
always evaluates to true, printing the pathname of the current file to stdout. If none of -exec, -ls, -print, -print0, or -ok is specified, the given expression shall be effectively replaced by ( given expression ) -print. |
|
| -print0 | always evaluates to true, printing the pathname of the current file to stdout followed by an ASCII NUL character (character code 0). For use with xargs -0. |
| -prune | causes find to not descend into the current file; always evaluates to true |
| -type TYPE | true if the file is of type TYPE |
| -depth DEPTH | true if the depth of the file relative to the starting point is equal to DEPTH |
File Types#
For use with -type TYPE:
| b | block special |
| c | character special |
| d | directory |
| f | file |
| l | symbolic link |
| p | FIFO |
| s | socket |
Operators#
| -a | -and | the logical AND operator |
| -o | -or | the logical OR operator |
Examples#
Grouping Multiple Conditions#
$ find . -type f \
-and \( \
-name '*.html' \
-or -name '*.css' \
-or -name '*.ico' \
-or -name '*.map' \
-or -name '*.js' \
-or -name '*.json' \
-or -name '*.xml' \
-or -name '*.txt' \
-or -name '*.svg' \
\)
Printing files#
Print all files in the current directory’s hierarchy, excluding ./excluded-path (and every file underneath ./excluded-path):
$ find . -path ./excluded-path -prune -or -print
Breakdown:
- recursively descend into . and evaluate the expression (-path ./excluded-path -prune -or -print) on every pathname:
-path ./excluded-pathreturns:trueif the pathname matches ./excluded-pathfalseif the pathname does not match
- if
truewas returned, evaluate -prune, which tellsfindnot to descend into that pathname, excluding it and all contained files, and returnstrue, stopping expression evaluation. The next pathname is recursively chosen. - if
false, evaluate the -or side of the expression - -print prints the pathname and evaluates to
true - the next pathname is recursively chosen
grep#
file pattern searcher
Examples#
Recursively search all subdirectories and files:
$ grep -r 'pattern' /path/to/dir
gzip, gunzip, zcat, gzcat#
head#
do not print the first line:
head -n +2 foo.txt
cat foo.txt | head -n +2
less#
View text file contents, paginated, without reading the whole file.
Commands#
| h | display a help summary of less commands |
| q | exit; quit |
| e or j | forward 1 line |
| y or k | backward 1 line |
| f | forward 1 window |
| b | backward 1 window |
| d | forward 1 half-window |
| u | backward 1 half-window |
| /pattern | Search forward for matching line |
| ?pattern | Search backward for matching line |
| &pattern | filter file for lines matching pattern; supply empty pattern and hit ↵ Enter to exit |
| n | next match |
| N | previous match |
Frequently Asked Questions#
How to exit &pattern?#
- type & again, with no input
- hit ↵ Enter
ln#
make links
Best Practices#
- use relative symbolic links
- create relative symbolic links from the directory which the link will live
Example:
$ ln -s ../path/to/foo foo
ls#
List directory contents.
Examples#
Default:
$ ls
my-directory my-fifo my-symbolic_link
my-executable my-normal-file
List contents, distinguishing each by special trailing character:
$ ls -F
my-directory/ my-fifo| my-symbolic_link@
my-executable* my-normal-file
List contents, distinguishing each by special trailing character, each on its own line:
$ ls -F1
my-directory/
my-executable*
my-fifo|
my-normal-file
my-symbolic-link@
man#
Format and display the system’s on-line manual pages.
Defaults#
| pager | less -is |
Manual Sections#
| 1 | User Commands |
| 2 | System Calls |
| 3 | C Library Functions |
| 4 | Devices and Special Files |
| 5 | File Formats and Conventions |
| 6 | Games |
| 7 | Miscellaneous Information |
| 8 | System Administration tools and Daemons |
| 9 | Kernel Routines |
Examples#
Search the system’s whatis database for strings matching the provided pattern:
$ man -k '^intro'
intro(1) - introduction to general commands (tools and utilities)
intro(2) - introduction to system calls and error numbers
intro(3) - introduction to the C libraries
intro(5) - introduction to file formats
intro(7) - miscellaneous information pages
intro(8) - introduction to system maintenance procedures and commands
intro(9) - introduction to system kernel interfaces
$ man intro
$ man 1 intro
$ man 2 intro
Frequently Asked Questions#
What do the numbers mean after unix commands?#
The number refers to the section of the manual, described above. In the case of git(1), the (1) indicates that this refers to git the user command. This disambiguation is useful when a string of characters has multiple meanings (e.g. printf).
What happens when I type man git?#
Depending on your terminal, shell, and operating system:
- the manual for git is located for
- a pager, like less, is called to view the found manual page
How to navigate to links in a man page?#
When using less as your pager this is not possible. Other man page viewers allow this.
mktemp#
Make temporary filenames or directory names.
Examples#
Make temporary file:
$ echo $TMPDIR
/tmp
$ mktemp
/tmp/tmp.bN0khCLV
$ mktemp -t some-prefix
/tmp/some-prefix.zDu8khd0
$ mktemp template-string.X
template-string.n
$ mktemp template-string.XX
template-string.yK
$ mktemp template-string.XXX
template-string.BS2
$ mktemp template-string.XXX template-string.XXX
template-string.k0J
template-string.t92
Make temporary directory:
$ echo $TMPDIR
/tmp
$ mktemp -d
/tmp/tmp.p3BbpeXj
$ mktemp -d -t some-prefix
/tmp/some-prefix.6z40Wn1h
$ mktemp -d relative-to-current-directory.XXX
relative-to-current-directory.lQM
Make temporary directory and change directory to it:
$ cd $(mktemp -d relative-to-current-directory.XXX)
pgrep#
find processes by name
pgrep my-process-name
rm#
rm -rf -- /path/to/delete
The -- is intentional and demarcates the end of options.
sha1sum#
Comput and check SHA1 message digest.
Examples#
$ echo -n 'hello world' | sha1sum
2aae6c35c94fcfb415dbe95f408b9ce91ee846ed -
$ echo -n 'hello world' > hello-world.txt
$ sha1sum hello-world.txt
2aae6c35c94fcfb415dbe95f408b9ce91ee846ed hello-world.txt
shutdown#
With systemd prefer:
- systemctl halt
- systemctl poweroff
- systemctl reboot
shutdown --help
shutdown -r now
shutdown
stat#
Display file status.
Examples#
Display verbose file information:
$ stat -x foo
File: "foo"
Size: 0 FileType: Regular File
Mode: (0644/-rw-r--r--) Uid: ( 501/klandergren) Gid: ( 20/ staff)
Device: 1,4 Inode: 8692341193 Links: 1
Access: Fri Jun 25 11:21:52 2021
Modify: Fri Jun 25 11:21:52 2021
Change: Fri Jun 25 11:21:55 2021
tail#
display the last part of a file
Examples#
Display all but the first line (skip first line; skip n lines):
$ tail -n +1 file.txt
tar#
create and manipulate streaming archive files
| -C | --directory | c and r mode: change to directory before adding files; x mode: change directories after opening but before extracting |
| -a | --auto-compress | c mode only: use the archive suffix to decide how to compress |
| -c | --create | create a new archive |
| -f | --file | read from or write to the specified file |
| -t | --list | list archive contents |
| -v | --verbose | produce verbose output |
| -x | --extract | extract to disk from the archive |
| -z | --gzip, --gunzip | c mode only: compress the resulting archive with gzip(1) |
Examples#
Create archive my-archive.tar from my-directory:
tar --create --file my-archive.tar my-directory
tar cf my-archive.tar my-directory
Create compressed archive my-archive.tgz, auto compressing based on the extension, from my-directory:
tar --auto-compress --create --file my-archive.tgz my-directory
tar acf my-archive.tgz my-directory
Create compressed archive my-archive.tar.gz, using gzip explicitly, from my-directory:
tar --create --gzip --file my-archive.tar.gz my-directory
tar czf my-archive.tgz my-directory
Uncompress and extract my-archive.tar.gz:
tar --extract --gzip --file my-archive.tar.gz
tar xzf my-archive.tar.gz
Extract my-archive.tar, changing directory to my-directory first (creating my-directory/my-archive, with caveats that you should review the man page for behavior when my-directory/my-archive already exists):
tar --extract --file my-archive.tar --directory my-directory
tar xf my-archive.tar -C my-directory
List the contents of my-archive.tar without extracting:
tar --list --file my-archive.tar
tar tf my-archive.tar
wc#
word, line, character, and byte count
Examples#
Count the number of lines:
$ cat foo | wc -l
42
$ wc -l foo
42 foo
$ wc -l foo bar
42 foo
42 bar
84 total
xargs#
construct argument list(s) and execute utility
General Structure#
xargs -I {} -t sh -c '[COMMAND USING $1]' sh {}
Gotchas#
- there is a command length limit of 255 characters
- workaround: using $1 in combination with a single substitution
Selected Options#
| -I replstr | replace one or more occurrences of replstr |
| -t | echo command to be executed before executing |
Examples#
$ find . -type f | xargs -I {} -t sh -c 'echo "$1"' sh {}
sh -c echo "$1" sh ./foo.txt
./foo.txt
sh -c echo "$1" sh ./bar.txt
./bar.txt
$ find . -type f | xargs -I {} -t sh -c 'echo "$1"; echo "$1"' sh {}
sh -c echo "$1"; echo "$1" sh ./foo.txt
./foo.txt
./foo.txt
sh -c echo "$1"; echo "$1" sh ./bar.txt
./bar.txt
./bar.txt
Other Programs#
rsync#
faster, flexible replacement for rcp
Examples#
delete files at destination:
$ rsync --verbose --archive --human-readable path_src/ path_dest/ --delete
sponge#
allows in-place editing of files.
broken because the redirection operator executes first, opening the file with O_TRUNC, leaving the file as 0 bytes:
grep "foo" bar.txt > bar.txt
works:
grep "foo" bar.txt | sponge bar.txt
tree#
List contents of directories in a tree-like format.
Examples#
preferred invocation:
- show hidden files
- append a character relative to the type; same as ls -F
- no report
$ tree -a -F --noreport
.
├── .hidden-file
├── bar/
│ ├── bar.a
│ └── baz/
│ └── baz.a
└── foo/
└── foo.a
default invocation:
$ tree
.
├── bar
│ ├── bar.a
│ └── baz
│ └── baz.a
└── foo
└── foo.a
3 directories, 3 files
control depth:
$ tree -a --noreport -L 1
.
├── .hidden-file
├── bar
└── foo
exclude files that match multiple patterns:
$ tree -a -F --noreport -I 'baz|*.a'
.
├── .hidden-file
├── bar/
└── foo/
wget#
wget -O myfile.zip https://example.com/foo.zip
Shell builtins#
type#
Determine interpretation of text if the text is used as a command name.
Examples#
$ type type
type is a shell builtin
$ type -a type
type is a shell builtin
type is /usr/bin/type
true#
Always returns a 0 exit code.
Shell Techniques#
Determining Which Shell You Are In#
echo $0
Redirection Operators#
Non-exhaustive. Full list available in the bash manual chapter for redirections.
| > | redirect output |
| >> | append output |
| < | redirect input |
Understanding stdout and stderr#
stdout |
1 |
the machine readable output of a program |
stderr |
2 |
everything else; including what is intended for human consumption (progress indicators, prompts, etc) |
Think to yourself: what is this program’s main purpose when it is chained together with other commands?
Whatever output that is is the candidate for stdout.
Everything else is likely on stderr.
So what that means in practice is that if your pipe to a pager (or tail, or whatever) is not working the way that you expect, consider whether the output is being written to stderr:
% cmd 2>&1 | tail
Process Substitution#
Piping the output of multiple processes:
$ diff <(echo -e 'hello\nworld') <(echo -e 'goodbye\nworld')
1c1
< hello
---
> goodbye
Exit Codes#
| 0 | success |
| 1 | error |
Beware! This is not the same as boolean types:
| 0 | false |
| 1 | true |
Signals#
| HUP |
| SIGINT |
| SIGHUP |
Permissions#
| octal | symbolic | owner | group | others |
|---|---|---|---|---|
| 0000 | ---------- | --- | --- | --- |
| 0001 | ---------x | --- | --- | --x |
| 0002 | --------w- | --- | --- | -w- |
| 0003 | --------wx | --- | --- | -wx |
| 0004 | -------r-- | --- | --- | r-- |
| 0005 | -------r-x | --- | --- | r-x |
| 0006 | -------rw- | --- | --- | rw- |
| 0007 | -------rwx | --- | --- | rwx |
| 0010 | ------x--- | --- | --x | --- |
| 0011 | ------x--x | --- | --x | --x |
| 0012 | ------x-w- | --- | --x | -w- |
| 0013 | ------x-wx | --- | --x | -wx |
| 0014 | ------xr-- | --- | --x | r-- |
| 0015 | ------xr-x | --- | --x | r-x |
| 0016 | ------xrw- | --- | --x | rw- |
| 0017 | ------xrwx | --- | --x | rwx |
| 0020 | -----w---- | --- | -w- | --- |
| 0021 | -----w---x | --- | -w- | --x |
| 0022 | -----w--w- | --- | -w- | -w- |
| 0023 | -----w--wx | --- | -w- | -wx |
| 0024 | -----w-r-- | --- | -w- | r-- |
| 0025 | -----w-r-x | --- | -w- | r-x |
| 0026 | -----w-rw- | --- | -w- | rw- |
| 0027 | -----w-rwx | --- | -w- | rwx |
| 0030 | -----wx--- | --- | -wx | --- |
| 0031 | -----wx--x | --- | -wx | --x |
| 0032 | -----wx-w- | --- | -wx | -w- |
| 0033 | -----wx-wx | --- | -wx | -wx |
| 0034 | -----wxr-- | --- | -wx | r-- |
| 0035 | -----wxr-x | --- | -wx | r-x |
| 0036 | -----wxrw- | --- | -wx | rw- |
| 0037 | -----wxrwx | --- | -wx | rwx |
| 0040 | ----r----- | --- | r-- | --- |
| 0041 | ----r----x | --- | r-- | --x |
| 0042 | ----r---w- | --- | r-- | -w- |
| 0043 | ----r---wx | --- | r-- | -wx |
| 0044 | ----r--r-- | --- | r-- | r-- |
| 0045 | ----r--r-x | --- | r-- | r-x |
| 0046 | ----r--rw- | --- | r-- | rw- |
| 0047 | ----r--rwx | --- | r-- | rwx |
| 0050 | ----r-x--- | --- | r-x | --- |
| 0051 | ----r-x--x | --- | r-x | --x |
| 0052 | ----r-x-w- | --- | r-x | -w- |
| 0053 | ----r-x-wx | --- | r-x | -wx |
| 0054 | ----r-xr-- | --- | r-x | r-- |
| 0055 | ----r-xr-x | --- | r-x | r-x |
| 0056 | ----r-xrw- | --- | r-x | rw- |
| 0057 | ----r-xrwx | --- | r-x | rwx |
| 0060 | ----rw---- | --- | rw- | --- |
| 0061 | ----rw---x | --- | rw- | --x |
| 0062 | ----rw--w- | --- | rw- | -w- |
| 0063 | ----rw--wx | --- | rw- | -wx |
| 0064 | ----rw-r-- | --- | rw- | r-- |
| 0065 | ----rw-r-x | --- | rw- | r-x |
| 0066 | ----rw-rw- | --- | rw- | rw- |
| 0067 | ----rw-rwx | --- | rw- | rwx |
| 0070 | ----rwx--- | --- | rwx | --- |
| 0071 | ----rwx--x | --- | rwx | --x |
| 0072 | ----rwx-w- | --- | rwx | -w- |
| 0073 | ----rwx-wx | --- | rwx | -wx |
| 0074 | ----rwxr-- | --- | rwx | r-- |
| 0075 | ----rwxr-x | --- | rwx | r-x |
| 0076 | ----rwxrw- | --- | rwx | rw- |
| 0077 | ----rwxrwx | --- | rwx | rwx |
| 0100 | ---x------ | --x | --- | --- |
| 0101 | ---x-----x | --x | --- | --x |
| 0102 | ---x----w- | --x | --- | -w- |
| 0103 | ---x----wx | --x | --- | -wx |
| 0104 | ---x---r-- | --x | --- | r-- |
| 0105 | ---x---r-x | --x | --- | r-x |
| 0106 | ---x---rw- | --x | --- | rw- |
| 0107 | ---x---rwx | --x | --- | rwx |
| 0110 | ---x--x--- | --x | --x | --- |
| 0111 | ---x--x--x | --x | --x | --x |
| 0112 | ---x--x-w- | --x | --x | -w- |
| 0113 | ---x--x-wx | --x | --x | -wx |
| 0114 | ---x--xr-- | --x | --x | r-- |
| 0115 | ---x--xr-x | --x | --x | r-x |
| 0116 | ---x--xrw- | --x | --x | rw- |
| 0117 | ---x--xrwx | --x | --x | rwx |
| 0120 | ---x-w---- | --x | -w- | --- |
| 0121 | ---x-w---x | --x | -w- | --x |
| 0122 | ---x-w--w- | --x | -w- | -w- |
| 0123 | ---x-w--wx | --x | -w- | -wx |
| 0124 | ---x-w-r-- | --x | -w- | r-- |
| 0125 | ---x-w-r-x | --x | -w- | r-x |
| 0126 | ---x-w-rw- | --x | -w- | rw- |
| 0127 | ---x-w-rwx | --x | -w- | rwx |
| 0130 | ---x-wx--- | --x | -wx | --- |
| 0131 | ---x-wx--x | --x | -wx | --x |
| 0132 | ---x-wx-w- | --x | -wx | -w- |
| 0133 | ---x-wx-wx | --x | -wx | -wx |
| 0134 | ---x-wxr-- | --x | -wx | r-- |
| 0135 | ---x-wxr-x | --x | -wx | r-x |
| 0136 | ---x-wxrw- | --x | -wx | rw- |
| 0137 | ---x-wxrwx | --x | -wx | rwx |
| 0140 | ---xr----- | --x | r-- | --- |
| 0141 | ---xr----x | --x | r-- | --x |
| 0142 | ---xr---w- | --x | r-- | -w- |
| 0143 | ---xr---wx | --x | r-- | -wx |
| 0144 | ---xr--r-- | --x | r-- | r-- |
| 0145 | ---xr--r-x | --x | r-- | r-x |
| 0146 | ---xr--rw- | --x | r-- | rw- |
| 0147 | ---xr--rwx | --x | r-- | rwx |
| 0150 | ---xr-x--- | --x | r-x | --- |
| 0151 | ---xr-x--x | --x | r-x | --x |
| 0152 | ---xr-x-w- | --x | r-x | -w- |
| 0153 | ---xr-x-wx | --x | r-x | -wx |
| 0154 | ---xr-xr-- | --x | r-x | r-- |
| 0155 | ---xr-xr-x | --x | r-x | r-x |
| 0156 | ---xr-xrw- | --x | r-x | rw- |
| 0157 | ---xr-xrwx | --x | r-x | rwx |
| 0160 | ---xrw---- | --x | rw- | --- |
| 0161 | ---xrw---x | --x | rw- | --x |
| 0162 | ---xrw--w- | --x | rw- | -w- |
| 0163 | ---xrw--wx | --x | rw- | -wx |
| 0164 | ---xrw-r-- | --x | rw- | r-- |
| 0165 | ---xrw-r-x | --x | rw- | r-x |
| 0166 | ---xrw-rw- | --x | rw- | rw- |
| 0167 | ---xrw-rwx | --x | rw- | rwx |
| 0170 | ---xrwx--- | --x | rwx | --- |
| 0171 | ---xrwx--x | --x | rwx | --x |
| 0172 | ---xrwx-w- | --x | rwx | -w- |
| 0173 | ---xrwx-wx | --x | rwx | -wx |
| 0174 | ---xrwxr-- | --x | rwx | r-- |
| 0175 | ---xrwxr-x | --x | rwx | r-x |
| 0176 | ---xrwxrw- | --x | rwx | rw- |
| 0177 | ---xrwxrwx | --x | rwx | rwx |
| 0200 | --w------- | -w- | --- | --- |
| 0201 | --w------x | -w- | --- | --x |
| 0202 | --w-----w- | -w- | --- | -w- |
| 0203 | --w-----wx | -w- | --- | -wx |
| 0204 | --w----r-- | -w- | --- | r-- |
| 0205 | --w----r-x | -w- | --- | r-x |
| 0206 | --w----rw- | -w- | --- | rw- |
| 0207 | --w----rwx | -w- | --- | rwx |
| 0210 | --w---x--- | -w- | --x | --- |
| 0211 | --w---x--x | -w- | --x | --x |
| 0212 | --w---x-w- | -w- | --x | -w- |
| 0213 | --w---x-wx | -w- | --x | -wx |
| 0214 | --w---xr-- | -w- | --x | r-- |
| 0215 | --w---xr-x | -w- | --x | r-x |
| 0216 | --w---xrw- | -w- | --x | rw- |
| 0217 | --w---xrwx | -w- | --x | rwx |
| 0220 | --w--w---- | -w- | -w- | --- |
| 0221 | --w--w---x | -w- | -w- | --x |
| 0222 | --w--w--w- | -w- | -w- | -w- |
| 0223 | --w--w--wx | -w- | -w- | -wx |
| 0224 | --w--w-r-- | -w- | -w- | r-- |
| 0225 | --w--w-r-x | -w- | -w- | r-x |
| 0226 | --w--w-rw- | -w- | -w- | rw- |
| 0227 | --w--w-rwx | -w- | -w- | rwx |
| 0230 | --w--wx--- | -w- | -wx | --- |
| 0231 | --w--wx--x | -w- | -wx | --x |
| 0232 | --w--wx-w- | -w- | -wx | -w- |
| 0233 | --w--wx-wx | -w- | -wx | -wx |
| 0234 | --w--wxr-- | -w- | -wx | r-- |
| 0235 | --w--wxr-x | -w- | -wx | r-x |
| 0236 | --w--wxrw- | -w- | -wx | rw- |
| 0237 | --w--wxrwx | -w- | -wx | rwx |
| 0240 | --w-r----- | -w- | r-- | --- |
| 0241 | --w-r----x | -w- | r-- | --x |
| 0242 | --w-r---w- | -w- | r-- | -w- |
| 0243 | --w-r---wx | -w- | r-- | -wx |
| 0244 | --w-r--r-- | -w- | r-- | r-- |
| 0245 | --w-r--r-x | -w- | r-- | r-x |
| 0246 | --w-r--rw- | -w- | r-- | rw- |
| 0247 | --w-r--rwx | -w- | r-- | rwx |
| 0250 | --w-r-x--- | -w- | r-x | --- |
| 0251 | --w-r-x--x | -w- | r-x | --x |
| 0252 | --w-r-x-w- | -w- | r-x | -w- |
| 0253 | --w-r-x-wx | -w- | r-x | -wx |
| 0254 | --w-r-xr-- | -w- | r-x | r-- |
| 0255 | --w-r-xr-x | -w- | r-x | r-x |
| 0256 | --w-r-xrw- | -w- | r-x | rw- |
| 0257 | --w-r-xrwx | -w- | r-x | rwx |
| 0260 | --w-rw---- | -w- | rw- | --- |
| 0261 | --w-rw---x | -w- | rw- | --x |
| 0262 | --w-rw--w- | -w- | rw- | -w- |
| 0263 | --w-rw--wx | -w- | rw- | -wx |
| 0264 | --w-rw-r-- | -w- | rw- | r-- |
| 0265 | --w-rw-r-x | -w- | rw- | r-x |
| 0266 | --w-rw-rw- | -w- | rw- | rw- |
| 0267 | --w-rw-rwx | -w- | rw- | rwx |
| 0270 | --w-rwx--- | -w- | rwx | --- |
| 0271 | --w-rwx--x | -w- | rwx | --x |
| 0272 | --w-rwx-w- | -w- | rwx | -w- |
| 0273 | --w-rwx-wx | -w- | rwx | -wx |
| 0274 | --w-rwxr-- | -w- | rwx | r-- |
| 0275 | --w-rwxr-x | -w- | rwx | r-x |
| 0276 | --w-rwxrw- | -w- | rwx | rw- |
| 0277 | --w-rwxrwx | -w- | rwx | rwx |
| 0300 | --wx------ | -wx | --- | --- |
| 0301 | --wx-----x | -wx | --- | --x |
| 0302 | --wx----w- | -wx | --- | -w- |
| 0303 | --wx----wx | -wx | --- | -wx |
| 0304 | --wx---r-- | -wx | --- | r-- |
| 0305 | --wx---r-x | -wx | --- | r-x |
| 0306 | --wx---rw- | -wx | --- | rw- |
| 0307 | --wx---rwx | -wx | --- | rwx |
| 0310 | --wx--x--- | -wx | --x | --- |
| 0311 | --wx--x--x | -wx | --x | --x |
| 0312 | --wx--x-w- | -wx | --x | -w- |
| 0313 | --wx--x-wx | -wx | --x | -wx |
| 0314 | --wx--xr-- | -wx | --x | r-- |
| 0315 | --wx--xr-x | -wx | --x | r-x |
| 0316 | --wx--xrw- | -wx | --x | rw- |
| 0317 | --wx--xrwx | -wx | --x | rwx |
| 0320 | --wx-w---- | -wx | -w- | --- |
| 0321 | --wx-w---x | -wx | -w- | --x |
| 0322 | --wx-w--w- | -wx | -w- | -w- |
| 0323 | --wx-w--wx | -wx | -w- | -wx |
| 0324 | --wx-w-r-- | -wx | -w- | r-- |
| 0325 | --wx-w-r-x | -wx | -w- | r-x |
| 0326 | --wx-w-rw- | -wx | -w- | rw- |
| 0327 | --wx-w-rwx | -wx | -w- | rwx |
| 0330 | --wx-wx--- | -wx | -wx | --- |
| 0331 | --wx-wx--x | -wx | -wx | --x |
| 0332 | --wx-wx-w- | -wx | -wx | -w- |
| 0333 | --wx-wx-wx | -wx | -wx | -wx |
| 0334 | --wx-wxr-- | -wx | -wx | r-- |
| 0335 | --wx-wxr-x | -wx | -wx | r-x |
| 0336 | --wx-wxrw- | -wx | -wx | rw- |
| 0337 | --wx-wxrwx | -wx | -wx | rwx |
| 0340 | --wxr----- | -wx | r-- | --- |
| 0341 | --wxr----x | -wx | r-- | --x |
| 0342 | --wxr---w- | -wx | r-- | -w- |
| 0343 | --wxr---wx | -wx | r-- | -wx |
| 0344 | --wxr--r-- | -wx | r-- | r-- |
| 0345 | --wxr--r-x | -wx | r-- | r-x |
| 0346 | --wxr--rw- | -wx | r-- | rw- |
| 0347 | --wxr--rwx | -wx | r-- | rwx |
| 0350 | --wxr-x--- | -wx | r-x | --- |
| 0351 | --wxr-x--x | -wx | r-x | --x |
| 0352 | --wxr-x-w- | -wx | r-x | -w- |
| 0353 | --wxr-x-wx | -wx | r-x | -wx |
| 0354 | --wxr-xr-- | -wx | r-x | r-- |
| 0355 | --wxr-xr-x | -wx | r-x | r-x |
| 0356 | --wxr-xrw- | -wx | r-x | rw- |
| 0357 | --wxr-xrwx | -wx | r-x | rwx |
| 0360 | --wxrw---- | -wx | rw- | --- |
| 0361 | --wxrw---x | -wx | rw- | --x |
| 0362 | --wxrw--w- | -wx | rw- | -w- |
| 0363 | --wxrw--wx | -wx | rw- | -wx |
| 0364 | --wxrw-r-- | -wx | rw- | r-- |
| 0365 | --wxrw-r-x | -wx | rw- | r-x |
| 0366 | --wxrw-rw- | -wx | rw- | rw- |
| 0367 | --wxrw-rwx | -wx | rw- | rwx |
| 0370 | --wxrwx--- | -wx | rwx | --- |
| 0371 | --wxrwx--x | -wx | rwx | --x |
| 0372 | --wxrwx-w- | -wx | rwx | -w- |
| 0373 | --wxrwx-wx | -wx | rwx | -wx |
| 0374 | --wxrwxr-- | -wx | rwx | r-- |
| 0375 | --wxrwxr-x | -wx | rwx | r-x |
| 0376 | --wxrwxrw- | -wx | rwx | rw- |
| 0377 | --wxrwxrwx | -wx | rwx | rwx |
| 0400 | -r-------- | r-- | --- | --- |
| 0401 | -r-------x | r-- | --- | --x |
| 0402 | -r------w- | r-- | --- | -w- |
| 0403 | -r------wx | r-- | --- | -wx |
| 0404 | -r-----r-- | r-- | --- | r-- |
| 0405 | -r-----r-x | r-- | --- | r-x |
| 0406 | -r-----rw- | r-- | --- | rw- |
| 0407 | -r-----rwx | r-- | --- | rwx |
| 0410 | -r----x--- | r-- | --x | --- |
| 0411 | -r----x--x | r-- | --x | --x |
| 0412 | -r----x-w- | r-- | --x | -w- |
| 0413 | -r----x-wx | r-- | --x | -wx |
| 0414 | -r----xr-- | r-- | --x | r-- |
| 0415 | -r----xr-x | r-- | --x | r-x |
| 0416 | -r----xrw- | r-- | --x | rw- |
| 0417 | -r----xrwx | r-- | --x | rwx |
| 0420 | -r---w---- | r-- | -w- | --- |
| 0421 | -r---w---x | r-- | -w- | --x |
| 0422 | -r---w--w- | r-- | -w- | -w- |
| 0423 | -r---w--wx | r-- | -w- | -wx |
| 0424 | -r---w-r-- | r-- | -w- | r-- |
| 0425 | -r---w-r-x | r-- | -w- | r-x |
| 0426 | -r---w-rw- | r-- | -w- | rw- |
| 0427 | -r---w-rwx | r-- | -w- | rwx |
| 0430 | -r---wx--- | r-- | -wx | --- |
| 0431 | -r---wx--x | r-- | -wx | --x |
| 0432 | -r---wx-w- | r-- | -wx | -w- |
| 0433 | -r---wx-wx | r-- | -wx | -wx |
| 0434 | -r---wxr-- | r-- | -wx | r-- |
| 0435 | -r---wxr-x | r-- | -wx | r-x |
| 0436 | -r---wxrw- | r-- | -wx | rw- |
| 0437 | -r---wxrwx | r-- | -wx | rwx |
| 0440 | -r--r----- | r-- | r-- | --- |
| 0441 | -r--r----x | r-- | r-- | --x |
| 0442 | -r--r---w- | r-- | r-- | -w- |
| 0443 | -r--r---wx | r-- | r-- | -wx |
| 0444 | -r--r--r-- | r-- | r-- | r-- |
| 0445 | -r--r--r-x | r-- | r-- | r-x |
| 0446 | -r--r--rw- | r-- | r-- | rw- |
| 0447 | -r--r--rwx | r-- | r-- | rwx |
| 0450 | -r--r-x--- | r-- | r-x | --- |
| 0451 | -r--r-x--x | r-- | r-x | --x |
| 0452 | -r--r-x-w- | r-- | r-x | -w- |
| 0453 | -r--r-x-wx | r-- | r-x | -wx |
| 0454 | -r--r-xr-- | r-- | r-x | r-- |
| 0455 | -r--r-xr-x | r-- | r-x | r-x |
| 0456 | -r--r-xrw- | r-- | r-x | rw- |
| 0457 | -r--r-xrwx | r-- | r-x | rwx |
| 0460 | -r--rw---- | r-- | rw- | --- |
| 0461 | -r--rw---x | r-- | rw- | --x |
| 0462 | -r--rw--w- | r-- | rw- | -w- |
| 0463 | -r--rw--wx | r-- | rw- | -wx |
| 0464 | -r--rw-r-- | r-- | rw- | r-- |
| 0465 | -r--rw-r-x | r-- | rw- | r-x |
| 0466 | -r--rw-rw- | r-- | rw- | rw- |
| 0467 | -r--rw-rwx | r-- | rw- | rwx |
| 0470 | -r--rwx--- | r-- | rwx | --- |
| 0471 | -r--rwx--x | r-- | rwx | --x |
| 0472 | -r--rwx-w- | r-- | rwx | -w- |
| 0473 | -r--rwx-wx | r-- | rwx | -wx |
| 0474 | -r--rwxr-- | r-- | rwx | r-- |
| 0475 | -r--rwxr-x | r-- | rwx | r-x |
| 0476 | -r--rwxrw- | r-- | rwx | rw- |
| 0477 | -r--rwxrwx | r-- | rwx | rwx |
| 0500 | -r-x------ | r-x | --- | --- |
| 0501 | -r-x-----x | r-x | --- | --x |
| 0502 | -r-x----w- | r-x | --- | -w- |
| 0503 | -r-x----wx | r-x | --- | -wx |
| 0504 | -r-x---r-- | r-x | --- | r-- |
| 0505 | -r-x---r-x | r-x | --- | r-x |
| 0506 | -r-x---rw- | r-x | --- | rw- |
| 0507 | -r-x---rwx | r-x | --- | rwx |
| 0510 | -r-x--x--- | r-x | --x | --- |
| 0511 | -r-x--x--x | r-x | --x | --x |
| 0512 | -r-x--x-w- | r-x | --x | -w- |
| 0513 | -r-x--x-wx | r-x | --x | -wx |
| 0514 | -r-x--xr-- | r-x | --x | r-- |
| 0515 | -r-x--xr-x | r-x | --x | r-x |
| 0516 | -r-x--xrw- | r-x | --x | rw- |
| 0517 | -r-x--xrwx | r-x | --x | rwx |
| 0520 | -r-x-w---- | r-x | -w- | --- |
| 0521 | -r-x-w---x | r-x | -w- | --x |
| 0522 | -r-x-w--w- | r-x | -w- | -w- |
| 0523 | -r-x-w--wx | r-x | -w- | -wx |
| 0524 | -r-x-w-r-- | r-x | -w- | r-- |
| 0525 | -r-x-w-r-x | r-x | -w- | r-x |
| 0526 | -r-x-w-rw- | r-x | -w- | rw- |
| 0527 | -r-x-w-rwx | r-x | -w- | rwx |
| 0530 | -r-x-wx--- | r-x | -wx | --- |
| 0531 | -r-x-wx--x | r-x | -wx | --x |
| 0532 | -r-x-wx-w- | r-x | -wx | -w- |
| 0533 | -r-x-wx-wx | r-x | -wx | -wx |
| 0534 | -r-x-wxr-- | r-x | -wx | r-- |
| 0535 | -r-x-wxr-x | r-x | -wx | r-x |
| 0536 | -r-x-wxrw- | r-x | -wx | rw- |
| 0537 | -r-x-wxrwx | r-x | -wx | rwx |
| 0540 | -r-xr----- | r-x | r-- | --- |
| 0541 | -r-xr----x | r-x | r-- | --x |
| 0542 | -r-xr---w- | r-x | r-- | -w- |
| 0543 | -r-xr---wx | r-x | r-- | -wx |
| 0544 | -r-xr--r-- | r-x | r-- | r-- |
| 0545 | -r-xr--r-x | r-x | r-- | r-x |
| 0546 | -r-xr--rw- | r-x | r-- | rw- |
| 0547 | -r-xr--rwx | r-x | r-- | rwx |
| 0550 | -r-xr-x--- | r-x | r-x | --- |
| 0551 | -r-xr-x--x | r-x | r-x | --x |
| 0552 | -r-xr-x-w- | r-x | r-x | -w- |
| 0553 | -r-xr-x-wx | r-x | r-x | -wx |
| 0554 | -r-xr-xr-- | r-x | r-x | r-- |
| 0555 | -r-xr-xr-x | r-x | r-x | r-x |
| 0556 | -r-xr-xrw- | r-x | r-x | rw- |
| 0557 | -r-xr-xrwx | r-x | r-x | rwx |
| 0560 | -r-xrw---- | r-x | rw- | --- |
| 0561 | -r-xrw---x | r-x | rw- | --x |
| 0562 | -r-xrw--w- | r-x | rw- | -w- |
| 0563 | -r-xrw--wx | r-x | rw- | -wx |
| 0564 | -r-xrw-r-- | r-x | rw- | r-- |
| 0565 | -r-xrw-r-x | r-x | rw- | r-x |
| 0566 | -r-xrw-rw- | r-x | rw- | rw- |
| 0567 | -r-xrw-rwx | r-x | rw- | rwx |
| 0570 | -r-xrwx--- | r-x | rwx | --- |
| 0571 | -r-xrwx--x | r-x | rwx | --x |
| 0572 | -r-xrwx-w- | r-x | rwx | -w- |
| 0573 | -r-xrwx-wx | r-x | rwx | -wx |
| 0574 | -r-xrwxr-- | r-x | rwx | r-- |
| 0575 | -r-xrwxr-x | r-x | rwx | r-x |
| 0576 | -r-xrwxrw- | r-x | rwx | rw- |
| 0577 | -r-xrwxrwx | r-x | rwx | rwx |
| 0600 | -rw------- | rw- | --- | --- |
| 0601 | -rw------x | rw- | --- | --x |
| 0602 | -rw-----w- | rw- | --- | -w- |
| 0603 | -rw-----wx | rw- | --- | -wx |
| 0604 | -rw----r-- | rw- | --- | r-- |
| 0605 | -rw----r-x | rw- | --- | r-x |
| 0606 | -rw----rw- | rw- | --- | rw- |
| 0607 | -rw----rwx | rw- | --- | rwx |
| 0610 | -rw---x--- | rw- | --x | --- |
| 0611 | -rw---x--x | rw- | --x | --x |
| 0612 | -rw---x-w- | rw- | --x | -w- |
| 0613 | -rw---x-wx | rw- | --x | -wx |
| 0614 | -rw---xr-- | rw- | --x | r-- |
| 0615 | -rw---xr-x | rw- | --x | r-x |
| 0616 | -rw---xrw- | rw- | --x | rw- |
| 0617 | -rw---xrwx | rw- | --x | rwx |
| 0620 | -rw--w---- | rw- | -w- | --- |
| 0621 | -rw--w---x | rw- | -w- | --x |
| 0622 | -rw--w--w- | rw- | -w- | -w- |
| 0623 | -rw--w--wx | rw- | -w- | -wx |
| 0624 | -rw--w-r-- | rw- | -w- | r-- |
| 0625 | -rw--w-r-x | rw- | -w- | r-x |
| 0626 | -rw--w-rw- | rw- | -w- | rw- |
| 0627 | -rw--w-rwx | rw- | -w- | rwx |
| 0630 | -rw--wx--- | rw- | -wx | --- |
| 0631 | -rw--wx--x | rw- | -wx | --x |
| 0632 | -rw--wx-w- | rw- | -wx | -w- |
| 0633 | -rw--wx-wx | rw- | -wx | -wx |
| 0634 | -rw--wxr-- | rw- | -wx | r-- |
| 0635 | -rw--wxr-x | rw- | -wx | r-x |
| 0636 | -rw--wxrw- | rw- | -wx | rw- |
| 0637 | -rw--wxrwx | rw- | -wx | rwx |
| 0640 | -rw-r----- | rw- | r-- | --- |
| 0641 | -rw-r----x | rw- | r-- | --x |
| 0642 | -rw-r---w- | rw- | r-- | -w- |
| 0643 | -rw-r---wx | rw- | r-- | -wx |
| 0644 | -rw-r--r-- | rw- | r-- | r-- |
| 0645 | -rw-r--r-x | rw- | r-- | r-x |
| 0646 | -rw-r--rw- | rw- | r-- | rw- |
| 0647 | -rw-r--rwx | rw- | r-- | rwx |
| 0650 | -rw-r-x--- | rw- | r-x | --- |
| 0651 | -rw-r-x--x | rw- | r-x | --x |
| 0652 | -rw-r-x-w- | rw- | r-x | -w- |
| 0653 | -rw-r-x-wx | rw- | r-x | -wx |
| 0654 | -rw-r-xr-- | rw- | r-x | r-- |
| 0655 | -rw-r-xr-x | rw- | r-x | r-x |
| 0656 | -rw-r-xrw- | rw- | r-x | rw- |
| 0657 | -rw-r-xrwx | rw- | r-x | rwx |
| 0660 | -rw-rw---- | rw- | rw- | --- |
| 0661 | -rw-rw---x | rw- | rw- | --x |
| 0662 | -rw-rw--w- | rw- | rw- | -w- |
| 0663 | -rw-rw--wx | rw- | rw- | -wx |
| 0664 | -rw-rw-r-- | rw- | rw- | r-- |
| 0665 | -rw-rw-r-x | rw- | rw- | r-x |
| 0666 | -rw-rw-rw- | rw- | rw- | rw- |
| 0667 | -rw-rw-rwx | rw- | rw- | rwx |
| 0670 | -rw-rwx--- | rw- | rwx | --- |
| 0671 | -rw-rwx--x | rw- | rwx | --x |
| 0672 | -rw-rwx-w- | rw- | rwx | -w- |
| 0673 | -rw-rwx-wx | rw- | rwx | -wx |
| 0674 | -rw-rwxr-- | rw- | rwx | r-- |
| 0675 | -rw-rwxr-x | rw- | rwx | r-x |
| 0676 | -rw-rwxrw- | rw- | rwx | rw- |
| 0677 | -rw-rwxrwx | rw- | rwx | rwx |
| 0700 | -rwx------ | rwx | --- | --- |
| 0701 | -rwx-----x | rwx | --- | --x |
| 0702 | -rwx----w- | rwx | --- | -w- |
| 0703 | -rwx----wx | rwx | --- | -wx |
| 0704 | -rwx---r-- | rwx | --- | r-- |
| 0705 | -rwx---r-x | rwx | --- | r-x |
| 0706 | -rwx---rw- | rwx | --- | rw- |
| 0707 | -rwx---rwx | rwx | --- | rwx |
| 0710 | -rwx--x--- | rwx | --x | --- |
| 0711 | -rwx--x--x | rwx | --x | --x |
| 0712 | -rwx--x-w- | rwx | --x | -w- |
| 0713 | -rwx--x-wx | rwx | --x | -wx |
| 0714 | -rwx--xr-- | rwx | --x | r-- |
| 0715 | -rwx--xr-x | rwx | --x | r-x |
| 0716 | -rwx--xrw- | rwx | --x | rw- |
| 0717 | -rwx--xrwx | rwx | --x | rwx |
| 0720 | -rwx-w---- | rwx | -w- | --- |
| 0721 | -rwx-w---x | rwx | -w- | --x |
| 0722 | -rwx-w--w- | rwx | -w- | -w- |
| 0723 | -rwx-w--wx | rwx | -w- | -wx |
| 0724 | -rwx-w-r-- | rwx | -w- | r-- |
| 0725 | -rwx-w-r-x | rwx | -w- | r-x |
| 0726 | -rwx-w-rw- | rwx | -w- | rw- |
| 0727 | -rwx-w-rwx | rwx | -w- | rwx |
| 0730 | -rwx-wx--- | rwx | -wx | --- |
| 0731 | -rwx-wx--x | rwx | -wx | --x |
| 0732 | -rwx-wx-w- | rwx | -wx | -w- |
| 0733 | -rwx-wx-wx | rwx | -wx | -wx |
| 0734 | -rwx-wxr-- | rwx | -wx | r-- |
| 0735 | -rwx-wxr-x | rwx | -wx | r-x |
| 0736 | -rwx-wxrw- | rwx | -wx | rw- |
| 0737 | -rwx-wxrwx | rwx | -wx | rwx |
| 0740 | -rwxr----- | rwx | r-- | --- |
| 0741 | -rwxr----x | rwx | r-- | --x |
| 0742 | -rwxr---w- | rwx | r-- | -w- |
| 0743 | -rwxr---wx | rwx | r-- | -wx |
| 0744 | -rwxr--r-- | rwx | r-- | r-- |
| 0745 | -rwxr--r-x | rwx | r-- | r-x |
| 0746 | -rwxr--rw- | rwx | r-- | rw- |
| 0747 | -rwxr--rwx | rwx | r-- | rwx |
| 0750 | -rwxr-x--- | rwx | r-x | --- |
| 0751 | -rwxr-x--x | rwx | r-x | --x |
| 0752 | -rwxr-x-w- | rwx | r-x | -w- |
| 0753 | -rwxr-x-wx | rwx | r-x | -wx |
| 0754 | -rwxr-xr-- | rwx | r-x | r-- |
| 0755 | -rwxr-xr-x | rwx | r-x | r-x |
| 0756 | -rwxr-xrw- | rwx | r-x | rw- |
| 0757 | -rwxr-xrwx | rwx | r-x | rwx |
| 0760 | -rwxrw---- | rwx | rw- | --- |
| 0761 | -rwxrw---x | rwx | rw- | --x |
| 0762 | -rwxrw--w- | rwx | rw- | -w- |
| 0763 | -rwxrw--wx | rwx | rw- | -wx |
| 0764 | -rwxrw-r-- | rwx | rw- | r-- |
| 0765 | -rwxrw-r-x | rwx | rw- | r-x |
| 0766 | -rwxrw-rw- | rwx | rw- | rw- |
| 0767 | -rwxrw-rwx | rwx | rw- | rwx |
| 0770 | -rwxrwx--- | rwx | rwx | --- |
| 0771 | -rwxrwx--x | rwx | rwx | --x |
| 0772 | -rwxrwx-w- | rwx | rwx | -w- |
| 0773 | -rwxrwx-wx | rwx | rwx | -wx |
| 0774 | -rwxrwxr-- | rwx | rwx | r-- |
| 0775 | -rwxrwxr-x | rwx | rwx | r-x |
| 0776 | -rwxrwxrw- | rwx | rwx | rw- |
| 0777 | -rwxrwxrwx | rwx | rwx | rwx |
XDG Base Directory Specification#
| $XDG_DATA_HOME | defines the base directory relative to which user-specific data files should be stored | $HOME/.local/share |
| $XDG_CONFIG_HOME | defines the base directory relative to which user-specific configuration files should be stored | $HOME/.config |
| $XDG_STATE_HOME | defines the base directory relative to which user-specific state files should be stored | $HOME/.local/state |
Resources#
Frequently Asked Questions (FAQ)#
When to use which vs. type?#
Prefer using type as it is defined in the POSIX specification and which is not. Additionally, prefer type -a so that you may distinguish all:
$ type -a type
type is a shell builtin
type is /usr/bin/type
How to view the man page for shell builtins?#
For bash:
$ man bash
or:
$ help builtin
When to use echo vs. printf?#
Use echo when:
- simplicity of use is preferred
Use printf when:
- a complex format string is needed
- the output begins with a dash (-) character to not conflict with echo options
Why do some command examples have a --?#
From bash(1) man page:
A -- signals the end of options and disables further option processing. Any arguments after the -- are treated as filenames and arguments. An argument of - is equivalent to --.
This protects against directories named with a leading dash being interpreted as options.
From the zsh User’s Guide with the following example:
print -- '$foo is "'$foo'"'
First, why did I put -- after the print? That's because print, like many UNIX commands, can take options after it which begin with a -. -- says that there are no more options; so if what you're trying to print begins with a -, it will still print out. Actually, in this case you can see it doesn't, so you're safe; but it's a good habit to get into, and I wish I had.
How do I change the sudo timeout?#
Consider adjusting the timestamp_timeout value in the sudoers file.
Edit the sudoers file:
sudo visudo
Add the following line, adjusting the value of n minutes accordingly:
Defaults timestamp_timeout=n
Where n values mean:
| -1 | never prompt |
| 0 | always prompt |
| n | prompt after n minutes |
What does Unix stand for? What is the origin of the name “Unix”? Is UNIX an acronym?#
UNIX (uppercased) is the trademark of Unix and is not an acronym.
Brian Kernighan coined the term “Unics” for Uniplexed Information and Computing Service in 1970. This was a “treacherous pun” on Multics, the Multiplexed Information and Computing Service. (One assumes the referenced treachery is due to its homophone and the operating system being a “somewhat neutered” version of Multics.) The origin of the “Unix” spelling is unknown.
More info: The Evolution of the Unix Time-sharing System* by Dennis M. Ritchie
Terminology#
- executable#(term executable)
- 1.
- Filesystem Hierarchy Standard (FHS)#(term Filesystem Hierarchy Standard)(term FHS)
- 1.
- shebang#(term shebang)
- 1.
The character sequence
#!, used to instruct the program loader to execute the specified interpreter program, e.g.#!/bin/shRelated: