Learning Unix/Linux: Based On Slides From: Eric Bishop
Learning Unix/Linux: Based On Slides From: Eric Bishop
Linux is free
It’s fully customizable
It’s stable (i.e. it almost never crashes)
The “prompt”
The host
What exactly is a “shell”?
After logging in, Linux/Unix starts another
program called the shell
The shell interprets commands the user types
and manages their execution
The shell communicates with the internal part of the
operating system called the kernel
The most popular shells are: tcsh, csh, korn, and bash
The differences are most times subtle
For this tutorial, we are using bash
/home/mary/
/home/john/portfolio/
The Path
Command: pwd
Writing C code:
IDE (Integrated development environment):
emacs, eclipse, code::blocks, qtcreator etc.
Any text editor + SHELL commands.
Visual Studio – not recommended as does not
support C99 and it is YOUR responsibility to
migrate the code to linux.
23
Displaying a file
Copying a file: cp
Move or rename a file: mv
Remove a file: rm
Command: cp
User (you)
File Permissions
Group
File Permissions
“The World”
Command: chmod
If you own the file, you can change it’s permissions with
“chmod”
Syntax: chmod [user/group/others/all]+[permission] [file(s)]
Below we grant execute permission to all:
Running a program (a.k.a. a job)
http://www.ee.surrey.ac.uk/Teaching/Unix/
http://www.ugu.com/sui/ugu/show?help.be
ginners
http://en.wikipedia.org/wiki/Unix
Emacs reference card
http://www.gnu.org/software/emacs/refcar
ds/pdf/refcard.pdf