Linux Overview
Linux Overview
Linux Overview
If you use one of our Linux machines in NPB 2.118 (approach #2),
see below.
The terminal window (where you can type command lines) in Linux Ubuntu 9.04
This will bring up the terminal window for the Linux 14.04 Approach #2 (Linux 14.04 in the lab):
workstations in our CS Lab.
With Linux 14.04 in our CS Lab, you can show a terminal session
by doing the following:
Click the start button (bottom left). A menu will appear
as shown to the right.
Select Accessories
Select LXTerminal
Some popular Command Line Commands # In the examples below, assume the command line prompt is $
# The shaded text is the response from Linux.
ls - list files in a directory
cd - change directory (navigate to a different directory) # change to my home directory. ~ is defined to be your home directory
# (i.e., highest directory)
cat - show the contents of a file or create a new file (also can be $ cd ~
used to concatenate files) # get the current directory
$ pwd
pwd - print working directory (i.e., show the current directory) /home/clark
mkdir - create a new directory
# make a directory named Mytemp
rm - remove files $ mkdir Mytemp
cp - copy files
# change to the Mytemp directory and get the current directory
mv - move or rename files $ cd Mytemp
$ pwd
/home/clark/Mytemp
# create a file named animal using the cat command, enter some text, and use
For more information, see programming assignment #0 and the # the CTRL and D keys to exit input.
$ cat >animal
Unix Cheat Sheet. dog
cat
dolphin
CTRL-D
# show the contents of animal using the cat command
$ cat animal
dog
cat
dolphin
If you are using Linux 14.04 in our CS Lab, click the bottom left
button and then select logout.