Linux introduction
Why Linux? Powerful (remote) shell
Starting with Linux Start a terminal window
Terminal
Who
Where
What
Details
The Linux Manual pages ls –l What does the “ -l ” option do? man ls NAME ls - list directory contents... -l use a long listing format …
Directory structure
/homehome directories for the users /etcsystem configuration files /varsystem log files /binprograms /usr/binprograms /sbinadministrator programs /usr/sbinadministrator programs /tmptemporary work space /mntnetwork disks /mediaCD-rom/DVD/USB sticks
The root directory
A closer look at a file
File/Directory permissions ls -l drwxr-xr-x 2 penguin users … scripts drwxr-xr-x -Directory (yes/no) -right for user, group and others -read, write and execute/open directory Access flags owner groupfile/directory name user group other
Running the Perl script
Where is the perl program?
Processes
Stopping a process
The root account The adminstrator account on a Linux system is called 'root' You need it to install new software
Usefull linux commands commanddescription pwdPrint the name of the current directory lsshow the files in a directory manOpen the manual page for a certain command cdChange directory fileExamine a file morePrint the contents of a text file (try also ‘less’) perlRun a perl script psList the running processes topList the active processes, updating killTerminate a process, try also 'pkill' and 'kill -9'
and more... commanddescription exitClose the current shell (also ctrl+d) sshOpen a connection to a remote computer cpCopy a file to a new location mvMove a file to a new location (or rename a file) rmRemove/delete a file mkdirCreate a new directory rmdirRemove a directory echoPrint a text findFind a file grepFind a text in one or more files
and even more... commanddescription screenstart a virtual terminal, if you want to switch off PC scpsecure network copy catprint the contents of a file to the terminal watchmonitor the output of a shell command tailprint the last lines of a text file, continuously headprint the first lines of a text file tarcreate of read a tarball archive gzipzip a file, use gunzip to unzip dateprint current date/time lncreate a (soft) link to a file, like a shortcut
... commanddescription suswitch to another user, default is 'root' sudoact as another user, password required zypperinstall new software, other flavours: apt-get, yum rebootreboot Linux shutdownshutdown the Linux environment printenvprint the environment variables setenvset the environment variables, depends on shell passwdchange your password