Linux commands
• The command line - Terminal, XTerm, or similar
• Commands are similar in both Linux and Mac OS
• Mac OS derived from
BSD (Berkeley Software Distribution) Unix
• This section is specific to Linux
ls
• Lists files, directories
• May support color coding;
• Blue is a directory,
red is an archive file, etc.
grep
cd
shutdown
•sudo shutdown 2
• Shuts down and turns off the computer
in two minutes
•Ctrl-C to cancel
pwd
passwd
mv
cp
rm
• Does not remove directories by default
• Directories must be empty to be removed or
must be removed with -r
mkdir
chmod
• Change mode of a file system object
• r=read, w=write, x=execute
• Can also use octal notation
• Set for the file owner (u), the group(g),
others(o), or all(a)chown
•iwconfig
•ifconfig
• View or configure a network interface and
IP configuration
•ifconfig eth0
ps
su / sudo
* There are some things normal users can’t do
•su
•sudo
apt-get
vi
• Insert tex
dd
[Options] • Creating a disk image •> dd if=/dev/sda of=/tmp/sda-image.img • Restoring from an image •> dd if=/tmp/sda-image.img of=/dev/sda
Closing programs
• Use terminal - sudo for proper permissions
•kill