Basic LINUX/UNIX Commands
时间:2006-10-18 来源:anima
Basic LINUX/UNIX Commands
- startx (start X-windows)
- exit (to exit completely once you have exit the windows system)
- ls (lists the files of the current directory or other directories)
- cd (change directory to home directory)
e.g. If your home directory is /u/ugrad/mikep and you execute the command cd from another directory
in the system, you'll be returned to /u/ugrad/mikep - cd directory-name (change directory to directory-name)
- mkdir directory-name (creates an new directory with name directory-name)
e.g. mkdir work (create directory with name work)
cd work (change directory to work) - mv file1 file2 (move file1 to file2, same as rename)
e.g. mv file1 cs111 (move file1 to subdirectory cs111) - rm file1 (remove file1, be careful: once removed, is removed)
- rm -i file1 (remove file, but it will ask for confirmation)
- whois gives information about a domain.
e.g. whois gate.net - whoami (display username)
- whereis command-name (returns the path of command-name)
- man command-name (prints how command-name works)
- hostname (prints the hostname)
- cp file1 file2 (copies file1 to file2)
- pwd (prints the working directory, i.e. "where we are")
- pico prog1.c (use the pico text editor to modify prog1.c; emacs, and vi can be used also)
- gcc prog1.c (compile prog1.c, the executable is a.out), cc instead of gcc should also work.
- gcc -o prog1 prog1.c (same as above but the name of the executable is prog1)
- ./prog1 (run prog1; it should be used when just the name of the executable is not enough)
相关阅读 更多 +