ECE222
Unix/Linux Commands
Basic Unix/Linux Commands
Command Function
man topic Displays help information about a particular topic
apropos topic Displays commands related to the topic
| A pipe – this will send output of one command into the input of another.
more filename Displays text on the screen one page at a time
ls Lists contents of current directory
mkdir Creates a directory
rmdir Removes a directory
cd directory Change the current directory to directory. cd .. moves to the upper directory.
cp source destination Copies one file to another
mv source destination Move a file source to a new directory destination. Also used to rename a file.
which command Tells you the path of a command.
pwd Tell you your current path.
ps Tells you which processes are running.
kill process_number Ends a process specified by its ID number.
command & The ampersand will cause the command to run in the background.
vi filename Edit a text file. Text-based, and does not need X window. Fast.
emacs filename Edit a text file in a graphic window. More user-friendly than vi.
setenv name value Define an environment variable name with value
source script Run a shell script file.
1
ECE222
Some Useful Information:
Introduction to Linux:
http://www.tldp.org/LDP/intro-linux/html/
Editors in Unix/Linux:
Vi: the most powerful text editor in Unix/Linux with a somewhat steep learning curve
Emacs: the most popular text editor in Unix/Linux. Also needs some time to get use to.
Gedit: a simple editor with GUI in Linux