Shell Basics Workshop Report n. 1/3 Juli 2010

By , July 15, 2010 03:20

>> nerdcafe Vetomat 12.7.2010        snufu/fuzzy speach, TKilla report

LinuxWorks workshop about Linux usage of the terminal.

Weekly appointment every Monday in Vetomat at 19:00. Scharnweberstrasse 35, F’hain, Berlin.

the “shell” is the program in the terminal,
–> Application –>Accessories —>Terminal
where you can run all the commands installed on the system
(the shell is called “bash” or “sh” or similar)

>> nerdcafe Vetomat 12.7.2010        snufu/fuzzy speach;  Tk report

all lines in this text starting with $ can be executed in a terminal
watch the output of the commands!!  (almost) every error is written there!

useful commands:
Its enough to write few letters and use TAB key — multiple times —
to autocomplete the command!!

arrow-up key     – goes back to the previous command
ctrl+r command    – search in command history

the format of the command is always:

commandname parameter1 parameter2 ..
programname -h          or
programname –help  for a long version

gives a short help and possible parameters of the command

$ man programname

manual of the program – RTFM – read this to know what it does 😉

$ apropos burn cd

tells which programs are doind the task

$ ssh user@hostname

login to another computer by console

$ screen -x

join a shared session (on another computer)
must be connected before to (ssh username@hostname)
screen runs multiple terminals (on a remote system) and you can switch between them

screen commands:
ctrl+a    a    – switch to another terminal
ctrl+a  ESC      – scroll with cursor keys

$ ls

list content of current directoy

$ ls -a

list –all: shows also hidden “.” dot-files (config files mostly)

$ less

shows 1 PAGE of output of a command  (contrast to “more” – that shows more 🙂 )

$ echo hiho > foobar

write hiho into the variable “foobar”

$ cat myman</pre>
<pre>$ tom

outputs the name of the var

$ cd /
"change dir" to root-dir "/"
"/" is the whole system - including all discs/partitions

$ cd    or  cd ~

“change dir” to your home dir “/home/yourusername/”,

$ echo foo > file1

write “foo” into a textfile file1

$ cat file1

print output of file1

$ head

show first lines of file

$ head -n 50

show first 50 lines of file

pipe command “>”

$ iwconfig > file1

write _standard_ output to file1

$ iwconfig > file1

write _serror_ output to file1 – “2” is the code for error outputs

$ echo ritual > fileX

add lines to file

$ echo ritual2 >> fileX
$ echo ritual3 >> fileX

connect terminal to remote window system

$ ssh username@hostname

connect to another computer and executes commands there

$ ssh -X username@hostname

activate X11 windowing forward on other computer

$ username@hostname: firefox

starts for example firefox on the remote machine and shows it on your screen

$ mv    file1 newfile

move file1 to another

$ less filename

show content of a text file

Comments are closed

WordPress Open Source Blog System
SynOptX Lab Theme