29
Linux introduction

Linux introduction. Why Linux? Powerful (remote) shell

Embed Size (px)

Citation preview

Page 1: Linux introduction. Why Linux? Powerful (remote) shell

Linux

introduction

Page 2: Linux introduction. Why Linux? Powerful (remote) shell

Why Linux?

Powerful (remote) shell

Page 3: Linux introduction. Why Linux? Powerful (remote) shell

Starting with Linux

Start a terminal window

Page 4: Linux introduction. Why Linux? Powerful (remote) shell

Terminal

Page 5: Linux introduction. Why Linux? Powerful (remote) shell

Who

Page 6: Linux introduction. Why Linux? Powerful (remote) shell

Where

Page 7: Linux introduction. Why Linux? Powerful (remote) shell

What

Page 8: Linux introduction. Why Linux? Powerful (remote) shell

Details

Page 9: Linux introduction. Why Linux? Powerful (remote) shell

The Linux Manual pages

penguin@bioinfc01:~> ls –l

What does the “-l” option do?

penguin@bioinfc01:~> man ls

NAMEls - list directory contents

...-l use a long listing format

Page 10: Linux introduction. Why Linux? Powerful (remote) shell

Directory structure

Page 11: Linux introduction. Why Linux? Powerful (remote) shell

/home home directories for the users/etc system configuration files/var system log files/bin programs/usr/bin programs/sbin administrator programs/usr/sbin administrator programs/tmp temporary work space/mnt network disks/mediaCD-rom/DVD/USB sticks

Page 12: Linux introduction. Why Linux? Powerful (remote) shell

The root directory

Page 13: Linux introduction. Why Linux? Powerful (remote) shell

A closer look at a file

Page 14: Linux introduction. Why Linux? Powerful (remote) shell

File/Directory permissionspenguin@bioinfc01:~> ls -ldrwxr-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 flagsowner

group file/directory name

user group other

Page 15: Linux introduction. Why Linux? Powerful (remote) shell

Running the Perl script

Page 16: Linux introduction. Why Linux? Powerful (remote) shell

Where is the perl program?

Page 17: Linux introduction. Why Linux? Powerful (remote) shell

Processes

Page 18: Linux introduction. Why Linux? Powerful (remote) shell

Stopping a process

Page 19: Linux introduction. Why Linux? Powerful (remote) shell

The root account

The adminstrator account on a Linux system is called 'root'

You need it to install new software

Page 20: Linux introduction. Why Linux? Powerful (remote) shell
Page 21: Linux introduction. Why Linux? Powerful (remote) shell
Page 22: Linux introduction. Why Linux? Powerful (remote) shell
Page 23: Linux introduction. Why Linux? Powerful (remote) shell
Page 24: Linux introduction. Why Linux? Powerful (remote) shell
Page 25: Linux introduction. Why Linux? Powerful (remote) shell
Page 26: Linux introduction. Why Linux? Powerful (remote) shell

Usefull linux commandscommand descriptionpwd Print the name of the current directoryls show the files in a directoryman Open the manual page for a certain commandcd Change directoryfile Examine a filemore Print the contents of a text file (try also ‘less’)perl Run a perl scriptps List the running processestop List the active processes, updatingkill Terminate a process, try also 'pkill' and 'kill -9'

Page 27: Linux introduction. Why Linux? Powerful (remote) shell

and more...command descriptionexit Close the current shell (also ctrl+d)ssh Open a connection to a remote computercp Copy a file to a new locationmv Move a file to a new location (or rename a file)rm Remove/delete a filemkdir Create a new directoryrmdir Remove a directoryecho Print a textfind Find a filegrep Find a text in one or more files

Page 28: Linux introduction. Why Linux? Powerful (remote) shell

and even more...command descriptionscreen start a virtual terminal, if you want to switch off PCscp secure network copycat print the contents of a file to the terminalwatch monitor the output of a shell commandtail print the last lines of a text file, continuouslyhead print the first lines of a text filetar create of read a tarball archivegzip zip a file, use gunzip to unzipdate print current date/timeln create a (soft) link to a file, like a shortcut

Page 29: Linux introduction. Why Linux? Powerful (remote) shell

...command descriptionsu switch to another user, default is 'root'sudo act as another user, password requiredzypper install new software, other flavours: apt-get, yumreboot reboot Linuxshutdown shutdown the Linux environmentprintenv print the environment variablessetenv set the environment variables, depends on shellpasswd change your password