SlideShare a Scribd company logo
The structure of Linux

Joachim Jacob
8 and 15 November 2013
Meet your Linux system
We'll see how a Linux system is organised
– into folders
– into files
– into partitions
Meet your Linux system
Follow a along: open

on the desktop.

('Computer' is specific for Linux Mint, won't find it on other Linuxes)

Read the contents of a CD/DVD

Read the hard disk
The root directory
The disk on your computer, which runs Linux is called /
or also referred to as the root directory.
It is the start of the file system. Enter the folder home.
The home folder
One of the folders under root is called home. Starting
from the root directory, the path to home is /home.
/home contains one or more folders: one for every
user on the system. Double-click on your home folder.
Permissions in your home
The complete path to your home folder is …..................
Linux is very secure. Only in your home folder you can
create files and folders, usually not anywhere else.
Create the folder bin in your home
Use the mouse (right-click), or press ctrl+shift+n, or,
go via the File menu.
Later, we will put scripts in this folder.

Create
this
folder
Visualize the tree structure
Go back to the root directory. Change the view to 'List'.
Visualize the tree structure
Clicking on the '+' expands the contents of that folder.
Below is the path visualized:
/home/joachim/Downloads/clustalw_2.1+lgpl-2_amd64.deb
The program files

Contain 'program' files
Disk and shares information
The administrator's home
Configuration files
Quickly changing content
Everything is a file in Linux

/dev/sda

/proc/meminfo

/dev/mouse1

/dev/input1

“Everything is a file in linux”: devices, and their
statuses are accessible by reading the contents of
the paths to the respective files.
Note: only text files can be displayed in human
readable format in text editors.
http://tldp.org/LDP/intro-linux/html/sect_03_01.html
http://en.wikipedia.org/wiki/Everything_is_a_file
Configurations are in plain text files

The text file
/etc/passwd
contains info
about the users
on your system
Natural fit of bioinformatics and Linux
Because of this amount of text, Linux comes with a lot
of command line tools to manipulate / search /
analyse text files.
Similarity with Bioinformatics,
which stores data also
pre-dominantly in large text
files.
Using the terminal as a solution
Before the rise of the nice desktops, users had only this:

Press ctrl + alt + F1
This means – users needed to navigate around on
their computers, read files, create files, print, run
programs, play games,... all from the command
line.
And yes, this is possible.
Using the terminal as a solution
Before the rise of the nice desktops, users had only this:

Press ctrl + alt + F1

(Lesson one in using Linux. Tux is friendly, but strict.)

Press ctrl + alt + F7
Access to a terminal
●

Open a terminal program using the menu:

Connect to a terminal over the internet, e.g. using Putty
installed on a Windows machine.
●

http://www.putty.org/
Your first steps in a terminal
We end up with this:

A terminal accepts only input from the keyboard, the
command line. You can only type. What you type gets
interpreted by the program Bash, which will then do
what you ask.
http://en.wikipedia.org/wiki/Bash_%28Unix_shell%29
Few important things

A command line is always positioned somewhere in the
file system.
● What you type is case-sensitive
● The prompt line can be customized, but by default it
shows:
● Username
● @
● Machinename
● Current location ('working directory'),
●
Check where your shell is positioned

...

After typing your command,
press <enter> to execute
a command.
pwd = print working directory
Navigating in the file system
The result is that the prompt
has changed position from:

ls = list contents of current directory
cd = change to this directory
The word after 'cd' matches a directory.
We tell 'cd' to go to this directory. This
Additional word is called an argument.

What will happen if we type 'ls' now?
Navigating in the file system
The result is that the prompt
has changed position from:
Running a command on a file
In a working directory, we can provide a file name as an
argument to a command. In the Downloads directory, we can
for example check a file type with the command file.
Argument points to a file

file = shows the file type of the file passed as argument
You never walk alone
A Linux system comes with batteries included: only they
are called man-pages (manual).
The program man displays the manual for the program
provided as argument.
For example: the manual of ls.

http://www.thegeekstuff.com/2013/09/man-command/
You never walk alone
Execute the program 'man'
with argument 'ls', meaning:
show me the manual of ls
Bowtie has also a manual
Usage tips for the program man
 and 

PgUp
PgDown or space
< and >
/
n
q

scroll up and down
previous page
next page
begin and end of the text file
search (forward)
next search hit
to exit

( The command man uses less under the hood to display the manual page.)
Fine-tuning commands behaviour






Reading man pages you can find how to use the
arguments and options.
Setting these influences the way commands behave.
Options precede arguments, and are separated from the
command (and from each other) by spaces. They usually
start with '-' or '--'.
For example:

$ ls -l /bin
Program (first
thing you type
should always be
a program)

From now on this will be the
notation for command line
instructions as a normal user

Option: you want
'ls' to change default
behaviour: -l adds
more info ('long').

Argument: on what
content (file,
directory,...) should
ls operate.
Help! The most used option
Another way to get help, besides the man pages,
is to invoke the option '--help'. Nearly every
command has this option.
Short and long options
Some options have two names: a short and a long
name. Short are one character long, and start with a '-'.
Long options are usually a word, and are preceded by
'--'.
Short options peculiarities




You can add multiple options to the command.
(the given order is seldom important)
$ ls -l -t /bin
$ ls -t -l /bin
Using short options allow you to combine several
options in one string.
$ ls -r -l -t
$ ls -rtl
Long options




'Long' options consist of -- (two dashes) followed
by the name of the option (string):
$ ls -–recursive
Long options cannot be combined like their
'short' counterparts
Options can also have arguments




For example, show the contents of the
directory, sorted by size of the files.
We use the option --sort for this: the argument
to sort must follow the option:

$ ls --sort=size /bin
the '=' sign is optional
An example of an argument to a short option:
–

●

$ ls -w 80 /bin


the space between option name and argument
is optional
Different combinations of options
$
$
$
$

ls
ls
ls
ls

-lr -w 80 /bin
-rlw 80 /bin
-wrl 80 /bin
# NOK
-w80 /bin -lr
Some basic commands
Command

Explanation

pwd

Print working directory

ls

Print content of directory

cd

Change directory

cat

Print the contents of a file

cp

Copy a file

mv

Move a file

rm

Remove a file

less

Read the contents of a file

clear

Clear the terminal screen

head

Show the first 10 lines of a file

tail

Show the last 10 lines of a file

nano

Text editor, to modify text files

wget

Download a file from an URL

http://wiki.bits.vib.be/index.php/Linux_Beginner%27s_Cheat_page
Exercise: gentle intro to the command line
→ Exercise link
Paths and the working directory

/

bin
boot
dev
etc
home
media
root
sbin
tmp
usr
var

james

Downloads

bin
sbin
share
local
lib
log
mail
run
spool
tmp

bin
sbin
share
Paths and the working directory
~ $ cd Downloads

/

bin
boot
dev
etc
home
media
root
sbin
tmp
usr
var

james

Downloads

bin
sbin
share
local
lib
log
mail
run
spool
tmp

bin
sbin
share
Paths and the working directory
~/Downloads $ cd ..

/

bin
boot
dev
etc
home
media
root
sbin
tmp
usr
var

james

Downloads

bin
sbin
share
local
lib
log
mail
run
spool
tmp

bin
sbin
share
Paths and the working directory
~ $ cd ../../usr

/

bin
boot
dev
etc
home
media
root
sbin
tmp
usr
var

james

Downloads

bin
sbin
share
local
lib
log
mail
run
spool
tmp

bin
sbin
share
Paths and the working directory
/usr $ cd local/bin

/

bin
boot
dev
etc
home
media
root
sbin
tmp
usr
var

james

Downloads

bin
sbin
share
local
lib
log
mail
run
spool
tmp

bin
sbin
share
Paths and the working directory
/usr/local/bin $ cd ../../../home/james

/

bin
boot
dev
etc
home
media
root
sbin
tmp
usr
var

james

Downloads

bin
sbin
share
local
lib
log
mail
run
spool
tmp

bin
sbin
share
Relative paths
The argument – the path to the directory in this case is relative to the current working directory.
In other words: which steps do we take from the
current directory to reach the destination.
/usr/local/bin $ cd ../../../home/james
/usr $ cd local/bin
~ $ cd ../../usr
~ $ cd Downloads
~/Downloads $ cd ..
Absolute paths
Sometimes it is more convenient to point to the
complete – or absolute - path of the directory,
starting from the root directory.

/

bin
boot
dev
etc
home
media
root
sbin
tmp
usr
var

james

Downloads
/home/james/Downloads

bin
sbin
share
local

bin
sbin
share
Paths and the working directory
~ $ cd /home/james/Downloads

/

bin
boot
dev
etc
home
media
root
sbin
tmp
usr
var

james

Downloads

bin
sbin
share
local
lib
log
mail
run
spool
tmp

bin
sbin
share
Paths and the working directory
~/Downloads $ cd /home/james

/

bin
boot
dev
etc
home
media
root
sbin
tmp
usr
var

james

Downloads

bin
sbin
share
local
lib
log
mail
run
spool
tmp

bin
sbin
share
Paths and the working directory
~ $ cd /usr

/

bin
boot
dev
etc
home
media
root
sbin
tmp
usr
var

james

Downloads

bin
sbin
share
local
lib
log
mail
run
spool
tmp

bin
sbin
share
Paths and the working directory
/usr $ cd /usr/local/bin

/

bin
boot
dev
etc
home
media
root
sbin
tmp
usr
var

james

Downloads

bin
sbin
share
local
lib
log
mail
run
spool
tmp

bin
sbin
share
Paths and the working directory
/usr/local/bin $ cd /home/james

/

bin
boot
dev
etc
home
media
root
sbin
tmp
usr
var

james

Downloads

bin
sbin
share
local
lib
log
mail
run
spool
tmp

bin
sbin
share
Relative versus absolute paths
Relative ↔ absolute (starts always with / - the root)
/usr/local/bin $ cd ../../../home/james
/usr/local/bin $ cd /home/james
/usr $ cd local/bin
/usr $ cd /usr/local/bin
~ $ cd ../../usr
~ $ cd /usr
~ $ cd Downloads
~ $ cd /home/james/Downloads
~/Downloads $ cd ..
~/Downloads $ cd /home/james
Hidden directories
●

Compare the output of ls versus ls -a

●

Check with the file manager your home.

●

Hidden files and folders start with '.'. They are
not shown by default.
Moving data around
●

Copy files:
$ cp <what> <to where>

●

Move files:
$ mv <what> <to where>

●

Remove files:
$ rm <filename>
Absolute or relative paths to the files
Moving data around
If we have following directory structure...
Downloads/

~

Annotation/
Rice/
Projects/
Butterfly/

Sequences/
Moving data around
If we have following directory structure...
Downloads/

~

Annotation/
Rice/
Projects/

Sequences/

Butterfly/
~ $ mkdir -p Projects/{Rice/{Annotation,Sequences},Butterfly}
~ $ cd ~/Downloads
~ $ wget http://dl.dropbox.com/u/58174806/Linuxsample.sam
Moving data around
Sample directory structure
Downloads/alignment.sam

~

Right
Rice/ click
Projects/

Annotation/
Sequences/

Butterfly/
~ $ mkdir -p Projects/{Rice/{Annotation,Sequences},Butterfly}
~ $ cd ~/Downloads
~ $ wget http://dl.dropbox.com/u/58174806/Linuxsample.sam
Moving data around
If we have following directory structure...
Downloads/Linuxsample.sam

~

Annotation/
Rice/
Projects/

Sequences/

Butterfly/
~ $ mkdir -p Projects/{Rice/{Annotation,Sequences},Butterfly}
~ $ cd ~/Downloads
~ $ wget http://dl.dropbox.com/u/58174806/Linuxsample.sam
Moving data around
Rename the downloaded Linuxsample.sam
Downloads/alignment.sam
Current working dir

~

Linuxsample.sam
Annotation/

Rice/
Projects/

Sequences/

Butterfly/
~/Downloads $ pwd
/home/joachim/Downloads
~/Downloads $ ls
Linuxsample.sam
~/Downloads $ mv Linuxsample.sam alignment.sam
Moving data around
Move the sam file
Downloads/alignment.sam
Current working dir

~

Annotation/
Rice/
Projects/

Sequences/

Butterfly/
~/Downloads $ mv alignment.sam ../Projects/Rice/Annotation/
Moving data around
Copy the sam file
Downloads/
Current working dir

~

Annotation/alignment.sam
Rice/
Projects/

Sequences/

Butterfly/
~/Downloads $ cp
../Projects/Rice/Annotation/alignment.sam
../Projects/Butterfly/
Moving data around
Copy the complete directory
Downloads/
Current working dir

~

Annotation/alignment.sam
Rice/
Projects/

Sequences/

Butterfly/alignment.sam
~/Downloads $ cp -R ~/Projects/Rice/Annotation/
../../Butterfly/
Reading files
Downloads/
Current working dir

~

Annotation/alignment.sam
Rice/
Projects/
Butterfly

Sequences/
alignment.sam
Annotation/alignment.sam

What kind of file is .sam?
Reading files
Downloads/
Current working dir

~

Annotation/alignment.sam
Rice/
Projects/
Butterfly

Sequences/
alignment.sam
Annotation/alignment.sam

$ cat : display the content of the file at once
$ less : display the content page by page
$ nano : edit the content of the file
Reading files
Try the 3 commands below
Downloads/

~

Annotation/alignment.sam
Rice/
Projects/
Butterfly

Sequences/
alignment.sam
Annotation/alignment.sam

~/Projects/Butterfly $ cat alignment.sam
~/Projects/Butterfly $ less alignment.sam
~/Projects/Butterfly $ nano alignment.sam
Editing files
nano is a popular text editor to edit files.
Reading files
Display first or last lines of a text file, with head or
tail.
~/Projects/Butterfly $ head alignment.sam
~/Projects/Butterfly $ tail alignment.sam
Question
How can I display the first 20 lines of a text file?
~ $ head --help
...
-n, --lines=[-]K
...

print the first K lines instead of the first 10;
with the leading `-', print all but the last
K lines of each file
Using the terminal efficiently
1. use arrow keys

http://z-dark.deviantart.com/art/Tux-Kids-desktop-22363967
Using the terminal efficiently




The program 'history' keeps track of the last ~500
commands you have typed.

Use arrows to select previously typed commands
Using the terminal efficiently
1. use arrow keys
2. use tab expansion
Using the terminal efficiently




Autocompletion, aka tab expansion: type the first letters
of the program or file, and then press <tab> key.
$ cd /h<tab>
$ cd /home/
However
$ cd /b<tab> gives you audible feedback:
there is no expansion possible
 there is more than one way to expand
$ cd /b<tab><tab> shows suitable expansions
bin/ boot/


$ cd /bo<tab>
$ cd /boot/
Using the terminal efficiently
1. use arrow keys
2. use tab expansion
3. use shorthand notations
Using the terminal efficiently
AUse shorthand notations for common directories:
●

~ is your home directory

●

.

●

.. is the directory one level up

is the current directory

To execute a previous command cmd again you can
use:
$ !cmd
e.g. $ !cd
Exercise: getting large data files.

→ Exercise link
Keywords
Root directory
path
home
terminal
Command line
user
bash
argument
recursively
command line options
Write in your own words what the terms mean
Break

More Related Content

What's hot

Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)
anandvaidya
 
Part 2 of 'Introduction to Linux for bioinformatics': Installing software
Part 2 of 'Introduction to Linux for bioinformatics': Installing softwarePart 2 of 'Introduction to Linux for bioinformatics': Installing software
Part 2 of 'Introduction to Linux for bioinformatics': Installing software
Joachim Jacob
 
Part 1 of 'Introduction to Linux for bioinformatics': Introduction
Part 1 of 'Introduction to Linux for bioinformatics': IntroductionPart 1 of 'Introduction to Linux for bioinformatics': Introduction
Part 1 of 'Introduction to Linux for bioinformatics': Introduction
Joachim Jacob
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
Shakeel Shafiq
 
A Quick Introduction to Linux
A Quick Introduction to LinuxA Quick Introduction to Linux
A Quick Introduction to Linux
Tusharadri Sarkar
 
Terminal Commands (Linux - ubuntu) (part-1)
Terminal Commands  (Linux - ubuntu) (part-1)Terminal Commands  (Linux - ubuntu) (part-1)
Terminal Commands (Linux - ubuntu) (part-1)
raj upadhyay
 
Linux presentation
Linux presentationLinux presentation
Linux presentationNikhil Jain
 
Linux Command Suumary
Linux Command SuumaryLinux Command Suumary
Linux Command Suumary
mentorsnet
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
Ramasubbu .P
 
Linux Getting Started
Linux Getting StartedLinux Getting Started
Linux Getting Started
Angus Li
 
Linux class 8 tar
Linux class 8   tar  Linux class 8   tar
Linux commands
Linux commands Linux commands
Linux commands
debashis rout
 
Linux command for beginners
Linux command for beginnersLinux command for beginners
Linux command for beginners
SuKyeong Jang
 
Linux Shell Basics
Linux Shell BasicsLinux Shell Basics
Linux Shell Basics
Constantine Nosovsky
 
50 most frequently used unix linux commands (with examples)
50 most frequently used unix   linux commands (with examples)50 most frequently used unix   linux commands (with examples)
50 most frequently used unix linux commands (with examples)
Rodrigo Maia
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1
Lilesh Pathe
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
Harish1983
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
Wave Digitech
 

What's hot (20)

Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)
 
Part 2 of 'Introduction to Linux for bioinformatics': Installing software
Part 2 of 'Introduction to Linux for bioinformatics': Installing softwarePart 2 of 'Introduction to Linux for bioinformatics': Installing software
Part 2 of 'Introduction to Linux for bioinformatics': Installing software
 
Part 1 of 'Introduction to Linux for bioinformatics': Introduction
Part 1 of 'Introduction to Linux for bioinformatics': IntroductionPart 1 of 'Introduction to Linux for bioinformatics': Introduction
Part 1 of 'Introduction to Linux for bioinformatics': Introduction
 
Basic linux commands
Basic linux commandsBasic linux commands
Basic linux commands
 
A Quick Introduction to Linux
A Quick Introduction to LinuxA Quick Introduction to Linux
A Quick Introduction to Linux
 
Terminal Commands (Linux - ubuntu) (part-1)
Terminal Commands  (Linux - ubuntu) (part-1)Terminal Commands  (Linux - ubuntu) (part-1)
Terminal Commands (Linux - ubuntu) (part-1)
 
Linux
Linux Linux
Linux
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Linux Command Suumary
Linux Command SuumaryLinux Command Suumary
Linux Command Suumary
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
Linux Getting Started
Linux Getting StartedLinux Getting Started
Linux Getting Started
 
Basic 50 linus command
Basic 50 linus commandBasic 50 linus command
Basic 50 linus command
 
Linux class 8 tar
Linux class 8   tar  Linux class 8   tar
Linux class 8 tar
 
Linux commands
Linux commands Linux commands
Linux commands
 
Linux command for beginners
Linux command for beginnersLinux command for beginners
Linux command for beginners
 
Linux Shell Basics
Linux Shell BasicsLinux Shell Basics
Linux Shell Basics
 
50 most frequently used unix linux commands (with examples)
50 most frequently used unix   linux commands (with examples)50 most frequently used unix   linux commands (with examples)
50 most frequently used unix linux commands (with examples)
 
Linux basics part 1
Linux basics part 1Linux basics part 1
Linux basics part 1
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
 

Viewers also liked

RNA-seq: general concept, goal and experimental design - part 1
RNA-seq: general concept, goal and experimental design - part 1RNA-seq: general concept, goal and experimental design - part 1
RNA-seq: general concept, goal and experimental design - part 1
BITS
 
BITS - Comparative genomics on the genome level
BITS - Comparative genomics on the genome levelBITS - Comparative genomics on the genome level
BITS - Comparative genomics on the genome level
BITS
 
RNA-seq: analysis of raw data and preprocessing - part 2
RNA-seq: analysis of raw data and preprocessing - part 2RNA-seq: analysis of raw data and preprocessing - part 2
RNA-seq: analysis of raw data and preprocessing - part 2
BITS
 
RNA-seq: Mapping and quality control - part 3
RNA-seq: Mapping and quality control - part 3RNA-seq: Mapping and quality control - part 3
RNA-seq: Mapping and quality control - part 3
BITS
 
BITS - Protein inference from mass spectrometry data
BITS - Protein inference from mass spectrometry dataBITS - Protein inference from mass spectrometry data
BITS - Protein inference from mass spectrometry data
BITS
 
BITS - Genevestigator to easily access transcriptomics data
BITS - Genevestigator to easily access transcriptomics dataBITS - Genevestigator to easily access transcriptomics data
BITS - Genevestigator to easily access transcriptomics data
BITS
 
BITS - Comparative genomics: the Contra tool
BITS - Comparative genomics: the Contra toolBITS - Comparative genomics: the Contra tool
BITS - Comparative genomics: the Contra tool
BITS
 
RNA-seq quality control and pre-processing
RNA-seq quality control and pre-processingRNA-seq quality control and pre-processing
RNA-seq quality control and pre-processing
mikaelhuss
 
RNA-seq for DE analysis: detecting differential expression - part 5
RNA-seq for DE analysis: detecting differential expression - part 5RNA-seq for DE analysis: detecting differential expression - part 5
RNA-seq for DE analysis: detecting differential expression - part 5
BITS
 
BITS - Introduction to comparative genomics
BITS - Introduction to comparative genomicsBITS - Introduction to comparative genomics
BITS - Introduction to comparative genomics
BITS
 
RNA-seq for DE analysis: the biology behind observed changes - part 6
RNA-seq for DE analysis: the biology behind observed changes - part 6RNA-seq for DE analysis: the biology behind observed changes - part 6
RNA-seq for DE analysis: the biology behind observed changes - part 6
BITS
 
RNA-seq for DE analysis: extracting counts and QC - part 4
RNA-seq for DE analysis: extracting counts and QC - part 4RNA-seq for DE analysis: extracting counts and QC - part 4
RNA-seq for DE analysis: extracting counts and QC - part 4
BITS
 
An introduction to RNA-seq data analysis
An introduction to RNA-seq data analysisAn introduction to RNA-seq data analysis
An introduction to RNA-seq data analysis
AGRF_Ltd
 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
 
BITS - Comparative genomics: gene family analysis
BITS - Comparative genomics: gene family analysisBITS - Comparative genomics: gene family analysis
BITS - Comparative genomics: gene family analysis
BITS
 
RNA-seq differential expression analysis
RNA-seq differential expression analysisRNA-seq differential expression analysis
RNA-seq differential expression analysis
mikaelhuss
 
Lokala banksystem utan vinstkrav - för tillväxt och hållbar utveckling
Lokala banksystem utan vinstkrav - för tillväxt och hållbar utvecklingLokala banksystem utan vinstkrav - för tillväxt och hållbar utveckling
Lokala banksystem utan vinstkrav - för tillväxt och hållbar utvecklingJonas Lagander
 
Genevestigator
GenevestigatorGenevestigator
Genevestigator
BITS
 
Projekt sociala ekonomin i motala - slutrapport 2015
Projekt sociala ekonomin i motala - slutrapport 2015Projekt sociala ekonomin i motala - slutrapport 2015
Projekt sociala ekonomin i motala - slutrapport 2015
Jonas Lagander
 
BITS: Introduction to Linux - Software installation the graphical and the co...
BITS: Introduction to Linux -  Software installation the graphical and the co...BITS: Introduction to Linux -  Software installation the graphical and the co...
BITS: Introduction to Linux - Software installation the graphical and the co...
BITS
 

Viewers also liked (20)

RNA-seq: general concept, goal and experimental design - part 1
RNA-seq: general concept, goal and experimental design - part 1RNA-seq: general concept, goal and experimental design - part 1
RNA-seq: general concept, goal and experimental design - part 1
 
BITS - Comparative genomics on the genome level
BITS - Comparative genomics on the genome levelBITS - Comparative genomics on the genome level
BITS - Comparative genomics on the genome level
 
RNA-seq: analysis of raw data and preprocessing - part 2
RNA-seq: analysis of raw data and preprocessing - part 2RNA-seq: analysis of raw data and preprocessing - part 2
RNA-seq: analysis of raw data and preprocessing - part 2
 
RNA-seq: Mapping and quality control - part 3
RNA-seq: Mapping and quality control - part 3RNA-seq: Mapping and quality control - part 3
RNA-seq: Mapping and quality control - part 3
 
BITS - Protein inference from mass spectrometry data
BITS - Protein inference from mass spectrometry dataBITS - Protein inference from mass spectrometry data
BITS - Protein inference from mass spectrometry data
 
BITS - Genevestigator to easily access transcriptomics data
BITS - Genevestigator to easily access transcriptomics dataBITS - Genevestigator to easily access transcriptomics data
BITS - Genevestigator to easily access transcriptomics data
 
BITS - Comparative genomics: the Contra tool
BITS - Comparative genomics: the Contra toolBITS - Comparative genomics: the Contra tool
BITS - Comparative genomics: the Contra tool
 
RNA-seq quality control and pre-processing
RNA-seq quality control and pre-processingRNA-seq quality control and pre-processing
RNA-seq quality control and pre-processing
 
RNA-seq for DE analysis: detecting differential expression - part 5
RNA-seq for DE analysis: detecting differential expression - part 5RNA-seq for DE analysis: detecting differential expression - part 5
RNA-seq for DE analysis: detecting differential expression - part 5
 
BITS - Introduction to comparative genomics
BITS - Introduction to comparative genomicsBITS - Introduction to comparative genomics
BITS - Introduction to comparative genomics
 
RNA-seq for DE analysis: the biology behind observed changes - part 6
RNA-seq for DE analysis: the biology behind observed changes - part 6RNA-seq for DE analysis: the biology behind observed changes - part 6
RNA-seq for DE analysis: the biology behind observed changes - part 6
 
RNA-seq for DE analysis: extracting counts and QC - part 4
RNA-seq for DE analysis: extracting counts and QC - part 4RNA-seq for DE analysis: extracting counts and QC - part 4
RNA-seq for DE analysis: extracting counts and QC - part 4
 
An introduction to RNA-seq data analysis
An introduction to RNA-seq data analysisAn introduction to RNA-seq data analysis
An introduction to RNA-seq data analysis
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
BITS - Comparative genomics: gene family analysis
BITS - Comparative genomics: gene family analysisBITS - Comparative genomics: gene family analysis
BITS - Comparative genomics: gene family analysis
 
RNA-seq differential expression analysis
RNA-seq differential expression analysisRNA-seq differential expression analysis
RNA-seq differential expression analysis
 
Lokala banksystem utan vinstkrav - för tillväxt och hållbar utveckling
Lokala banksystem utan vinstkrav - för tillväxt och hållbar utvecklingLokala banksystem utan vinstkrav - för tillväxt och hållbar utveckling
Lokala banksystem utan vinstkrav - för tillväxt och hållbar utveckling
 
Genevestigator
GenevestigatorGenevestigator
Genevestigator
 
Projekt sociala ekonomin i motala - slutrapport 2015
Projekt sociala ekonomin i motala - slutrapport 2015Projekt sociala ekonomin i motala - slutrapport 2015
Projekt sociala ekonomin i motala - slutrapport 2015
 
BITS: Introduction to Linux - Software installation the graphical and the co...
BITS: Introduction to Linux -  Software installation the graphical and the co...BITS: Introduction to Linux -  Software installation the graphical and the co...
BITS: Introduction to Linux - Software installation the graphical and the co...
 

Similar to The structure of Linux - Introduction to Linux for bioinformatics

Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.
Tushar B Kute
 
Linux Basics
Linux BasicsLinux Basics
Linux Basics
Team-VLSI-ITMU
 
linux-lecture4.ppt
linux-lecture4.pptlinux-lecture4.ppt
linux-lecture4.ppt
LuigysToro
 
Linux Cheat Sheet.pdf
Linux Cheat Sheet.pdfLinux Cheat Sheet.pdf
Linux Cheat Sheet.pdf
roschahacker
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
Sreenatha Reddy K R
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unixsouthees
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
harirxg
 
Unix Basics
Unix BasicsUnix Basics
Unix BasicsDr.Ravi
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritping
chockit88
 
Unix Basics 04sp
Unix Basics 04spUnix Basics 04sp
Unix Basics 04spDr.Ravi
 
Assignment OS LAB 2022
Assignment OS LAB 2022Assignment OS LAB 2022
Assignment OS LAB 2022
INFOTAINMENTCHANNEL1
 
Red hat linux essentials
Red hat linux essentialsRed hat linux essentials
Red hat linux essentials
Haitham Raik
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to LinuxDimas Prasetyo
 
Linux administration training
Linux administration trainingLinux administration training
Linux administration training
iman darabi
 
60761 linux
60761 linux60761 linux
60761 linux
Ritika Ahlawat
 

Similar to The structure of Linux - Introduction to Linux for bioinformatics (20)

Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.Module 3 Using Linux Softwares.
Module 3 Using Linux Softwares.
 
Linux Basics
Linux BasicsLinux Basics
Linux Basics
 
linux-lecture4.ppt
linux-lecture4.pptlinux-lecture4.ppt
linux-lecture4.ppt
 
Linux Cheat Sheet.pdf
Linux Cheat Sheet.pdfLinux Cheat Sheet.pdf
Linux Cheat Sheet.pdf
 
Linux commands and file structure
Linux commands and file structureLinux commands and file structure
Linux commands and file structure
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
8.1.intro unix
8.1.intro unix8.1.intro unix
8.1.intro unix
 
beginner.en.print
beginner.en.printbeginner.en.print
beginner.en.print
 
beginner.en.print
beginner.en.printbeginner.en.print
beginner.en.print
 
beginner.en.print
beginner.en.printbeginner.en.print
beginner.en.print
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
Unix Basics
Unix BasicsUnix Basics
Unix Basics
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritping
 
Unix Basics 04sp
Unix Basics 04spUnix Basics 04sp
Unix Basics 04sp
 
Assignment OS LAB 2022
Assignment OS LAB 2022Assignment OS LAB 2022
Assignment OS LAB 2022
 
Red hat linux essentials
Red hat linux essentialsRed hat linux essentials
Red hat linux essentials
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
 
Linux administration training
Linux administration trainingLinux administration training
Linux administration training
 
Tutorial 2
Tutorial 2Tutorial 2
Tutorial 2
 
60761 linux
60761 linux60761 linux
60761 linux
 

More from BITS

BITS - Overview of sequence databases for mass spectrometry data analysis
BITS - Overview of sequence databases for mass spectrometry data analysisBITS - Overview of sequence databases for mass spectrometry data analysis
BITS - Overview of sequence databases for mass spectrometry data analysis
BITS
 
BITS - Search engines for mass spec data
BITS - Search engines for mass spec dataBITS - Search engines for mass spec data
BITS - Search engines for mass spec data
BITS
 
BITS - Introduction to proteomics
BITS - Introduction to proteomicsBITS - Introduction to proteomics
BITS - Introduction to proteomics
BITS
 
BITS - Introduction to Mass Spec data generation
BITS - Introduction to Mass Spec data generationBITS - Introduction to Mass Spec data generation
BITS - Introduction to Mass Spec data generation
BITS
 
BITS training - UCSC Genome Browser - Part 2
BITS training - UCSC Genome Browser - Part 2BITS training - UCSC Genome Browser - Part 2
BITS training - UCSC Genome Browser - Part 2
BITS
 
Marcs (bio)perl course
Marcs (bio)perl courseMarcs (bio)perl course
Marcs (bio)perl course
BITS
 
Basics statistics
Basics statistics Basics statistics
Basics statistics
BITS
 
Cytoscape: Integrating biological networks
Cytoscape: Integrating biological networksCytoscape: Integrating biological networks
Cytoscape: Integrating biological networks
BITS
 
Cytoscape: Gene coexppression and PPI networks
Cytoscape: Gene coexppression and PPI networksCytoscape: Gene coexppression and PPI networks
Cytoscape: Gene coexppression and PPI networks
BITS
 
BITS: UCSC genome browser - Part 1
BITS: UCSC genome browser - Part 1BITS: UCSC genome browser - Part 1
BITS: UCSC genome browser - Part 1
BITS
 
Vnti11 basics course
Vnti11 basics courseVnti11 basics course
Vnti11 basics courseBITS
 
Bits protein structure
Bits protein structureBits protein structure
Bits protein structureBITS
 

More from BITS (12)

BITS - Overview of sequence databases for mass spectrometry data analysis
BITS - Overview of sequence databases for mass spectrometry data analysisBITS - Overview of sequence databases for mass spectrometry data analysis
BITS - Overview of sequence databases for mass spectrometry data analysis
 
BITS - Search engines for mass spec data
BITS - Search engines for mass spec dataBITS - Search engines for mass spec data
BITS - Search engines for mass spec data
 
BITS - Introduction to proteomics
BITS - Introduction to proteomicsBITS - Introduction to proteomics
BITS - Introduction to proteomics
 
BITS - Introduction to Mass Spec data generation
BITS - Introduction to Mass Spec data generationBITS - Introduction to Mass Spec data generation
BITS - Introduction to Mass Spec data generation
 
BITS training - UCSC Genome Browser - Part 2
BITS training - UCSC Genome Browser - Part 2BITS training - UCSC Genome Browser - Part 2
BITS training - UCSC Genome Browser - Part 2
 
Marcs (bio)perl course
Marcs (bio)perl courseMarcs (bio)perl course
Marcs (bio)perl course
 
Basics statistics
Basics statistics Basics statistics
Basics statistics
 
Cytoscape: Integrating biological networks
Cytoscape: Integrating biological networksCytoscape: Integrating biological networks
Cytoscape: Integrating biological networks
 
Cytoscape: Gene coexppression and PPI networks
Cytoscape: Gene coexppression and PPI networksCytoscape: Gene coexppression and PPI networks
Cytoscape: Gene coexppression and PPI networks
 
BITS: UCSC genome browser - Part 1
BITS: UCSC genome browser - Part 1BITS: UCSC genome browser - Part 1
BITS: UCSC genome browser - Part 1
 
Vnti11 basics course
Vnti11 basics courseVnti11 basics course
Vnti11 basics course
 
Bits protein structure
Bits protein structureBits protein structure
Bits protein structure
 

Recently uploaded

State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 

Recently uploaded (20)

State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 

The structure of Linux - Introduction to Linux for bioinformatics

  • 1. The structure of Linux Joachim Jacob 8 and 15 November 2013
  • 2. Meet your Linux system We'll see how a Linux system is organised – into folders – into files – into partitions
  • 3. Meet your Linux system Follow a along: open on the desktop. ('Computer' is specific for Linux Mint, won't find it on other Linuxes) Read the contents of a CD/DVD Read the hard disk
  • 4. The root directory The disk on your computer, which runs Linux is called / or also referred to as the root directory. It is the start of the file system. Enter the folder home.
  • 5. The home folder One of the folders under root is called home. Starting from the root directory, the path to home is /home. /home contains one or more folders: one for every user on the system. Double-click on your home folder.
  • 6. Permissions in your home The complete path to your home folder is ….................. Linux is very secure. Only in your home folder you can create files and folders, usually not anywhere else.
  • 7. Create the folder bin in your home Use the mouse (right-click), or press ctrl+shift+n, or, go via the File menu. Later, we will put scripts in this folder. Create this folder
  • 8. Visualize the tree structure Go back to the root directory. Change the view to 'List'.
  • 9. Visualize the tree structure Clicking on the '+' expands the contents of that folder. Below is the path visualized: /home/joachim/Downloads/clustalw_2.1+lgpl-2_amd64.deb
  • 10. The program files Contain 'program' files
  • 11. Disk and shares information
  • 15. Everything is a file in Linux /dev/sda /proc/meminfo /dev/mouse1 /dev/input1 “Everything is a file in linux”: devices, and their statuses are accessible by reading the contents of the paths to the respective files. Note: only text files can be displayed in human readable format in text editors. http://tldp.org/LDP/intro-linux/html/sect_03_01.html http://en.wikipedia.org/wiki/Everything_is_a_file
  • 16. Configurations are in plain text files The text file /etc/passwd contains info about the users on your system
  • 17. Natural fit of bioinformatics and Linux Because of this amount of text, Linux comes with a lot of command line tools to manipulate / search / analyse text files. Similarity with Bioinformatics, which stores data also pre-dominantly in large text files.
  • 18. Using the terminal as a solution Before the rise of the nice desktops, users had only this: Press ctrl + alt + F1 This means – users needed to navigate around on their computers, read files, create files, print, run programs, play games,... all from the command line. And yes, this is possible.
  • 19. Using the terminal as a solution Before the rise of the nice desktops, users had only this: Press ctrl + alt + F1 (Lesson one in using Linux. Tux is friendly, but strict.) Press ctrl + alt + F7
  • 20. Access to a terminal ● Open a terminal program using the menu: Connect to a terminal over the internet, e.g. using Putty installed on a Windows machine. ● http://www.putty.org/
  • 21. Your first steps in a terminal We end up with this: A terminal accepts only input from the keyboard, the command line. You can only type. What you type gets interpreted by the program Bash, which will then do what you ask. http://en.wikipedia.org/wiki/Bash_%28Unix_shell%29
  • 22.
  • 23. Few important things A command line is always positioned somewhere in the file system. ● What you type is case-sensitive ● The prompt line can be customized, but by default it shows: ● Username ● @ ● Machinename ● Current location ('working directory'), ●
  • 24. Check where your shell is positioned ... After typing your command, press <enter> to execute a command. pwd = print working directory
  • 25. Navigating in the file system The result is that the prompt has changed position from: ls = list contents of current directory cd = change to this directory The word after 'cd' matches a directory. We tell 'cd' to go to this directory. This Additional word is called an argument. What will happen if we type 'ls' now?
  • 26. Navigating in the file system The result is that the prompt has changed position from:
  • 27. Running a command on a file In a working directory, we can provide a file name as an argument to a command. In the Downloads directory, we can for example check a file type with the command file. Argument points to a file file = shows the file type of the file passed as argument
  • 28. You never walk alone A Linux system comes with batteries included: only they are called man-pages (manual). The program man displays the manual for the program provided as argument. For example: the manual of ls. http://www.thegeekstuff.com/2013/09/man-command/
  • 29. You never walk alone Execute the program 'man' with argument 'ls', meaning: show me the manual of ls
  • 30. Bowtie has also a manual
  • 31. Usage tips for the program man  and  PgUp PgDown or space < and > / n q scroll up and down previous page next page begin and end of the text file search (forward) next search hit to exit ( The command man uses less under the hood to display the manual page.)
  • 32. Fine-tuning commands behaviour    Reading man pages you can find how to use the arguments and options. Setting these influences the way commands behave. Options precede arguments, and are separated from the command (and from each other) by spaces. They usually start with '-' or '--'. For example: $ ls -l /bin Program (first thing you type should always be a program) From now on this will be the notation for command line instructions as a normal user Option: you want 'ls' to change default behaviour: -l adds more info ('long'). Argument: on what content (file, directory,...) should ls operate.
  • 33. Help! The most used option Another way to get help, besides the man pages, is to invoke the option '--help'. Nearly every command has this option.
  • 34. Short and long options Some options have two names: a short and a long name. Short are one character long, and start with a '-'. Long options are usually a word, and are preceded by '--'.
  • 35. Short options peculiarities   You can add multiple options to the command. (the given order is seldom important) $ ls -l -t /bin $ ls -t -l /bin Using short options allow you to combine several options in one string. $ ls -r -l -t $ ls -rtl
  • 36. Long options   'Long' options consist of -- (two dashes) followed by the name of the option (string): $ ls -–recursive Long options cannot be combined like their 'short' counterparts
  • 37. Options can also have arguments   For example, show the contents of the directory, sorted by size of the files. We use the option --sort for this: the argument to sort must follow the option: $ ls --sort=size /bin the '=' sign is optional An example of an argument to a short option: – ● $ ls -w 80 /bin  the space between option name and argument is optional
  • 38. Different combinations of options $ $ $ $ ls ls ls ls -lr -w 80 /bin -rlw 80 /bin -wrl 80 /bin # NOK -w80 /bin -lr
  • 39. Some basic commands Command Explanation pwd Print working directory ls Print content of directory cd Change directory cat Print the contents of a file cp Copy a file mv Move a file rm Remove a file less Read the contents of a file clear Clear the terminal screen head Show the first 10 lines of a file tail Show the last 10 lines of a file nano Text editor, to modify text files wget Download a file from an URL http://wiki.bits.vib.be/index.php/Linux_Beginner%27s_Cheat_page
  • 40. Exercise: gentle intro to the command line → Exercise link
  • 41. Paths and the working directory / bin boot dev etc home media root sbin tmp usr var james Downloads bin sbin share local lib log mail run spool tmp bin sbin share
  • 42. Paths and the working directory ~ $ cd Downloads / bin boot dev etc home media root sbin tmp usr var james Downloads bin sbin share local lib log mail run spool tmp bin sbin share
  • 43. Paths and the working directory ~/Downloads $ cd .. / bin boot dev etc home media root sbin tmp usr var james Downloads bin sbin share local lib log mail run spool tmp bin sbin share
  • 44. Paths and the working directory ~ $ cd ../../usr / bin boot dev etc home media root sbin tmp usr var james Downloads bin sbin share local lib log mail run spool tmp bin sbin share
  • 45. Paths and the working directory /usr $ cd local/bin / bin boot dev etc home media root sbin tmp usr var james Downloads bin sbin share local lib log mail run spool tmp bin sbin share
  • 46. Paths and the working directory /usr/local/bin $ cd ../../../home/james / bin boot dev etc home media root sbin tmp usr var james Downloads bin sbin share local lib log mail run spool tmp bin sbin share
  • 47. Relative paths The argument – the path to the directory in this case is relative to the current working directory. In other words: which steps do we take from the current directory to reach the destination. /usr/local/bin $ cd ../../../home/james /usr $ cd local/bin ~ $ cd ../../usr ~ $ cd Downloads ~/Downloads $ cd ..
  • 48. Absolute paths Sometimes it is more convenient to point to the complete – or absolute - path of the directory, starting from the root directory. / bin boot dev etc home media root sbin tmp usr var james Downloads /home/james/Downloads bin sbin share local bin sbin share
  • 49. Paths and the working directory ~ $ cd /home/james/Downloads / bin boot dev etc home media root sbin tmp usr var james Downloads bin sbin share local lib log mail run spool tmp bin sbin share
  • 50. Paths and the working directory ~/Downloads $ cd /home/james / bin boot dev etc home media root sbin tmp usr var james Downloads bin sbin share local lib log mail run spool tmp bin sbin share
  • 51. Paths and the working directory ~ $ cd /usr / bin boot dev etc home media root sbin tmp usr var james Downloads bin sbin share local lib log mail run spool tmp bin sbin share
  • 52. Paths and the working directory /usr $ cd /usr/local/bin / bin boot dev etc home media root sbin tmp usr var james Downloads bin sbin share local lib log mail run spool tmp bin sbin share
  • 53. Paths and the working directory /usr/local/bin $ cd /home/james / bin boot dev etc home media root sbin tmp usr var james Downloads bin sbin share local lib log mail run spool tmp bin sbin share
  • 54. Relative versus absolute paths Relative ↔ absolute (starts always with / - the root) /usr/local/bin $ cd ../../../home/james /usr/local/bin $ cd /home/james /usr $ cd local/bin /usr $ cd /usr/local/bin ~ $ cd ../../usr ~ $ cd /usr ~ $ cd Downloads ~ $ cd /home/james/Downloads ~/Downloads $ cd .. ~/Downloads $ cd /home/james
  • 55. Hidden directories ● Compare the output of ls versus ls -a ● Check with the file manager your home. ● Hidden files and folders start with '.'. They are not shown by default.
  • 56. Moving data around ● Copy files: $ cp <what> <to where> ● Move files: $ mv <what> <to where> ● Remove files: $ rm <filename> Absolute or relative paths to the files
  • 57. Moving data around If we have following directory structure... Downloads/ ~ Annotation/ Rice/ Projects/ Butterfly/ Sequences/
  • 58. Moving data around If we have following directory structure... Downloads/ ~ Annotation/ Rice/ Projects/ Sequences/ Butterfly/ ~ $ mkdir -p Projects/{Rice/{Annotation,Sequences},Butterfly} ~ $ cd ~/Downloads ~ $ wget http://dl.dropbox.com/u/58174806/Linuxsample.sam
  • 59. Moving data around Sample directory structure Downloads/alignment.sam ~ Right Rice/ click Projects/ Annotation/ Sequences/ Butterfly/ ~ $ mkdir -p Projects/{Rice/{Annotation,Sequences},Butterfly} ~ $ cd ~/Downloads ~ $ wget http://dl.dropbox.com/u/58174806/Linuxsample.sam
  • 60. Moving data around If we have following directory structure... Downloads/Linuxsample.sam ~ Annotation/ Rice/ Projects/ Sequences/ Butterfly/ ~ $ mkdir -p Projects/{Rice/{Annotation,Sequences},Butterfly} ~ $ cd ~/Downloads ~ $ wget http://dl.dropbox.com/u/58174806/Linuxsample.sam
  • 61. Moving data around Rename the downloaded Linuxsample.sam Downloads/alignment.sam Current working dir ~ Linuxsample.sam Annotation/ Rice/ Projects/ Sequences/ Butterfly/ ~/Downloads $ pwd /home/joachim/Downloads ~/Downloads $ ls Linuxsample.sam ~/Downloads $ mv Linuxsample.sam alignment.sam
  • 62. Moving data around Move the sam file Downloads/alignment.sam Current working dir ~ Annotation/ Rice/ Projects/ Sequences/ Butterfly/ ~/Downloads $ mv alignment.sam ../Projects/Rice/Annotation/
  • 63. Moving data around Copy the sam file Downloads/ Current working dir ~ Annotation/alignment.sam Rice/ Projects/ Sequences/ Butterfly/ ~/Downloads $ cp ../Projects/Rice/Annotation/alignment.sam ../Projects/Butterfly/
  • 64. Moving data around Copy the complete directory Downloads/ Current working dir ~ Annotation/alignment.sam Rice/ Projects/ Sequences/ Butterfly/alignment.sam ~/Downloads $ cp -R ~/Projects/Rice/Annotation/ ../../Butterfly/
  • 65. Reading files Downloads/ Current working dir ~ Annotation/alignment.sam Rice/ Projects/ Butterfly Sequences/ alignment.sam Annotation/alignment.sam What kind of file is .sam?
  • 66. Reading files Downloads/ Current working dir ~ Annotation/alignment.sam Rice/ Projects/ Butterfly Sequences/ alignment.sam Annotation/alignment.sam $ cat : display the content of the file at once $ less : display the content page by page $ nano : edit the content of the file
  • 67. Reading files Try the 3 commands below Downloads/ ~ Annotation/alignment.sam Rice/ Projects/ Butterfly Sequences/ alignment.sam Annotation/alignment.sam ~/Projects/Butterfly $ cat alignment.sam ~/Projects/Butterfly $ less alignment.sam ~/Projects/Butterfly $ nano alignment.sam
  • 68. Editing files nano is a popular text editor to edit files.
  • 69. Reading files Display first or last lines of a text file, with head or tail. ~/Projects/Butterfly $ head alignment.sam ~/Projects/Butterfly $ tail alignment.sam
  • 70. Question How can I display the first 20 lines of a text file? ~ $ head --help ... -n, --lines=[-]K ... print the first K lines instead of the first 10; with the leading `-', print all but the last K lines of each file
  • 71. Using the terminal efficiently 1. use arrow keys http://z-dark.deviantart.com/art/Tux-Kids-desktop-22363967
  • 72. Using the terminal efficiently   The program 'history' keeps track of the last ~500 commands you have typed. Use arrows to select previously typed commands
  • 73. Using the terminal efficiently 1. use arrow keys 2. use tab expansion
  • 74. Using the terminal efficiently   Autocompletion, aka tab expansion: type the first letters of the program or file, and then press <tab> key. $ cd /h<tab> $ cd /home/ However $ cd /b<tab> gives you audible feedback: there is no expansion possible  there is more than one way to expand $ cd /b<tab><tab> shows suitable expansions bin/ boot/  $ cd /bo<tab> $ cd /boot/
  • 75. Using the terminal efficiently 1. use arrow keys 2. use tab expansion 3. use shorthand notations
  • 76. Using the terminal efficiently AUse shorthand notations for common directories: ● ~ is your home directory ● . ● .. is the directory one level up is the current directory To execute a previous command cmd again you can use: $ !cmd e.g. $ !cd
  • 77. Exercise: getting large data files. → Exercise link
  • 79. Break