Linux run states, shell special commands, and directory structures
Archive - Originally posted on "The Horse's Mouth" - 2007-08-03 00:20:43 - Graham Ellis
Some useful notes from the board ... Run states of Unix and Linux systems:
0 - Halted
1 - Single User
2 - Multiuser
3 - Full Multiuser (inc servers)
5 - Same + X Windows
6 - transient reboot
Install Order for LAMP
Linux ...
... then Apache httpd
... then MySQL
... then PHP.
PHP must be after MySQL if you want to load in the drivers from the MySQL distribution within the PHP!
Lots of bin directories
bin directories contain (or originally contained) binary programs.
/bin - needed at boot time
/usr/bin - regular part of the operating system
/usr/local/bin - local additions to the OS
/usr/local/java/bin - Java binaries
/sbin - system admin binaries needed at boot
/usr/sbin - systenm admin binaries not needed at boot
Shell Special Characters
$ - Shell variable substitution
' - protect string from shell
" - protect string from shell (not $)
\ - protect next char from shell
` - run embedded command first
* - match any characters in file name
? - match any one character in file name
[] - match any listed character in file name
> - redirect stdout (output)
< - redirect stdin (input)
| - pipe output in to next command
space - separate parameters
c/r - command terminator
; - multiple commands on one line
& - run command in background