Isaac Jones
10/7/2001
Since you have access to the source code, you can alter it in order to improve the software and to customize it. You can verify for yourself that the software is secure, that it contains no viruses or backdoors, that its not spying on you and sending information to the government (if you live in a country where you can't trust the government) or to anyone else.
So log into your CIS account if you want to use that instead of Linux, or get to the Login point on the Xterm in front of you. Please share your terminal with the person sitting next to you, as we'll go through lots of examples which you will probably want to try on your own.
echo $SHELL \# tells you which shell you're using now passwd -r nis -e #then input: /usr/contrib/bin/bash
~/ means "your" home directory
export TEMP=$PS1 #save it for later export PS1="hi my name is hal: " export PS1="\t \u@\h: \w\n% " #if you want to change it back to what it was #before: export PS1=\$TEMP # otherwise, it'll reset next time we run bash, # we'll learn later how to save settings like # this.
export TEMP2=$TERM
export TERM=dumb
emacs -nw -q
export TERM=$TEMP2
emacs -nw -q
type emacs
export TEMP=$PATH
export PATH=
type emacs
ls
type ls
type cd
export PATH=/usr/bin
type emacs #its been found
type ls #still not found
for FILE in /bin/* ; do echo "$FILE"; done
#emulate ls
export PATH=/bin/:$PATH
type ls #now we found it
export PATH=$TEMP #get our old path back
export PATH=${HOME}/usr/bin:$PATH
#for your own executables
#BUT it still might not help, you should always
#run programs in the current directory with the
# "./" notation
export $PATH=$PATH:.
mkdir temp
cd temp;ls
emacs -nw -q helloWorld.c
#C program:
#include <stdio.h>
int main() {
printf ("Hello, World.\n");
return 0;
}
C-x C-c ;to exit emacs
gcc helloWorld.c -otest
test #why doesn't my program do anything!?
echo $PATH #dot is in my path
type test
#oops, test is built in!, it'll get run first
./test
which test
ls -l alias ll='ls -l' type ll ll alias emacs-quick='emacs -nw -q' emacs-quick #also can be used for long path names: mkdir -p ~/tmp/i/really/like/long/path/\ names/because/im/anal alias cdFast='cd ~/tmp/i/really/like/long\ /path/names/because/im/anal' cdFast alias emasc=emacs emasc
\${HOME}/.bashrc,
.bash_profile,
.profile
(ls -a /etc/skel)
more /etc/skel/{.bash_profile, .bashrc}
more ~ijones/.bashrc
source ~ijones/.bashrc
#notice how the prompt changes, since I
#have a prompt set PS1 in my .bashrc.
.bash\_profile: for login shells, should probably ``source ~/.bashrc''. I don't really use this file, except to run my .bashrc.
FILES
/bin/bash
The bash executable #may be elsewhere
/etc/profile
The systemwide initialization file, executed for
login shells
~/.bash_profile
The personal initialization file, executed for
login shells
~/.bashrc
The individual per-interactive-shell startup file
~/.bash_logout
The individual login shell cleanup file, executed
when a login shell exits
~/.inputrc
Individual readline initialization file
use `<' to redirect `stdin' (standard input) from a file
cat < ~/.bashrc #just like 'cat ~/.bashrc'
use `>' to redirect `stdout' (standard output) to a file
ls /etc ; ls /etc > ectOutput more etcOutput
cat file1 file2>file3
ls /etc | less #whenever output is too big, you can use | less #use q to quit less, :n for next file, / to search
ls * |tee teeFile
ls /etc/|tee teeFile2|less
who | grep ijones ls /etc|grep net #see all files containing net
find . -print | xargs grep "mail" #like rgrep find . -name *.cpp |xargs less #as opposed to: find . -name *.cpp |less
pushd . cd pwd popd
chmod (u | g | o | a) (+ | -) (r | w | x) are the basics
chmod u+x myProgram
#to make a script or program executable perl
#example
chmod a+rx ${HOME}/WWW
chmod -R a+rX ${HOME}/WWW
#will make all your WWW files world readable
ssh -X theta.cis.ohio-state.edu #with the version on debian man ssh #for how to do it with your version
see http://www.cis.ohio-state.edu/~rowland/vnc
O'Reilly: http://www.oreilly.com/catalog/bash2/
This document was generated using the LaTeX2HTML translator Version 2K.1beta (1.48)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -split 0 newbiesTalkOutline -dir newbiesTalkWeb
The translation was initiated by Isaac Jones on 2001-10-02