Linux Command line
จาก Wiki2
เนื้อหา |
Link
- Command compare to DOS
- List of the command line
- Command Line made easy http://linuxmanpages.com/
- How to wirte shell script
- sample script of mount windows disk
- Steve's Shellscript Subset tutorial
- Linux Shell Scripting Tutorial A Beginner's handbook
- Bash Manual Shell Script
How to enter shell
- Terminal Program
- Virtual Console
Hold down key Ctrl+Alt and press F2 or F4 or F5
and exit by type "exit" or F7- Hold down key Ctrl+Alt + Arrow key left or right to move around
- Booting into the shell
In order to start GUI type "startx"
How to log in to root user
- sudo su
- or sudo -i
Please note your prompt will be "#", in order to exit type "exit"
prompt
- "<user name>@<computer name>: path $" such as "jk@jk:~$"
- "~" = home directory
- $ = ordinary user prompt while, # = root user
OS Variable
- Linux store all data in variable and you can see it by command "echo" for ex: "echo $PATH"
Run Program
- To run program in current directory "./myprogram" use dot follow by slash.
Get help of the command
- <command> --help
- man <command>
- info <command>
- whatis <command>
- whereis <command> look where is the command and help file
- whereis command—Returns the location of the command and its man page.
- whatis command—Returns a one-line synopsis from the command’s man page.
- locate file—Returns locations of all matching file(s); an extremely fast method of searching your system because locate searches a database containing an index of all files on your system.
- apropos subject—Returns a list of commands related to subject.
List of Hardware
$sudo lshw
$sudo lshw -C disk
$sudo lshw -html > your-file-name.html
Hardware List 29 may 2009 21:30
USB Microphone
Run file manager as root
jk@jk:~$ sudo nautilus
Check current director
pwd
Look for the file
locate <file/directory name>
- look for all director for file namd "httpd.conf"
- sudo find / -name httpd.conf
