SlideShare uma empresa Scribd logo
1 de 4
Baixar para ler offline
Linux

Linux is a free operating system, I’m not insisting that you use it (after today) but it is useful for
you to be aware that free operating systems and software are available. Open–source software
can be modified by users as the source code is freely available. A wide variety of open–source
software is available including word processing and speadsheet packages. If you have only used
Microsoft Windows in the past you might find it difficult to start using Linux but you just need
time to familiarise yourself with it. For many tasks, Linux is an easier environment to work in
than Windows. When you send email or use the internet you are, indirectly, using open–source
software.

There are different versions of Linux and the default for your computers is called ‘gnome’.

This handout just provides you with basic information required for this course. You do not
need to memorise everything, mainly to be aware of what you can do and to know where you
can get information.


Help with Unix/Linux

Some websites which have information on linux, open–source software and basic commands:

www.linux.ie/newusers/beginners-linux-guide
www.schoolforge.net
www.seul.org/edu
go.local.net/LinuxGuide/
www.ugu.com
www.gnu.com



Starting

Reboot the computer then select Fedora Core NOT Windows.

At the log in screen, change the language to English (using ‘Tungumal’ at the bottom left hand
side) – any version. Then log in as normal using your username and password.

At the top of the screen there is a toolbar – but this can be dragged to the bottom if you prefer.

To open programs you can either use the Applications menu (the Red Hat of the toolbar -
left mouse button) or open them from a shell (terminal window). The shell can also execute
commands and is a programming environment. It is much faster (and more flexible) to use the
shell than the menu. Frequently used programs can also be opened from the toolbar – you can
customise this by installing your choice of icons there.

To open a shell/terminal window, right click on the background and select ‘open terminal’.


The shell/terminal window

The shell executes commands: this includes starting programs, moving between directories,
creating new directories etc

The shell opens automatically in your home directory. As you are working on a laptop your
home directory is on the hard disk of the computer. It is better if you work from your home
directory on the network as it is backed up regularly and your files will be easily accessible from
both Linux and Windows.

The path of your network directory is:

/nethome/unu/<username>

To go to your network directory from the linux shell type:

cd /nethome/unu/<username>

To return to the home directory on your laptop:

cd

You can see which directory you are in from the prompt in the shell.

Linux is case sensitive ie LS is not the same as ls. Some of the most useful commands are:

Some basic shell commands are:
                    lists files and directories
 ls
                    creates a new directory
 mkdir <dir>
                    move to new directory
 cd <dir>
                    move back one directory
 cd ..
                    move to home directory
 cd
 cp <file1> <file2> copy file1 to a new file
 mv <file1> <file2> move/rename file1 to a new file
                    remove/delete a file
 rm <file>
                    remove/delete a directory
 rmdir <dir>
There are also further options, known as switches, for these commands, eg:
 ls -l long list with more information on files such as the
          owner of the file and when it was last modified
 ls -a lists all files, not hiding those starting with a .

A useful feature of the shell is filename completion, where filenames or directory names are
completed for you. eg In your home directory make a new directory called stockassessment (a
long name), then change directory into stockassessment

 mkdir stockassessment
 cd sto press TAB (above caps lock).

 If stockassessment is the only option the full name is completed and you can then press
 RETURN.
 If there is more than one option starting with ‘sto’, nothing is presented, then if you do
 Ctrl-d, all options are presented and if you type in more the options will be fewer.

If you have another directory in you home diectory called stockmodels, what happens when you
use filename completion?

Remove these new directories.

To repeat or view earlier commands you can use the up arrow (moving back again with the
down arrow).


Text editors

An easy way to write text files is to use a text editor. Commands for R, the statistical package
you will be using, are entered on the command line ie you type in the commands directly or
read in a file containing commands, you do not use menus. Either to keep a record of your work
or to write the R commands into a file you should use a text editor. Then, when you repeat
work, or do similar work you will have examples you can work from.

Word processing packages should not be used for this purpose. Text editors store text as ASCII
which is a more stable format, creates much smaller files using less memory and you don’t have
problems reading old files due to upgrades. It is particularly important to store data in stable
file formats. Data stored in a spreadsheet such as Excel is more easily corrupted and there can
be problems with version changes.


Emacs

A powerful and easy to use text editor is emacs. Emacs can be opened from the terminal
window by typing emacs &. What happens if you don’t use the &?

If you type & after a command you can continue to use the terminal when the program is
running.

To open an existing file called fish (or if you wish to create a new file called fish) type:

emacs fish &

into the terminal.

To save a file in emacs either use the menu:

Files → Save Buffer/Save Buffer As

or

the icons – 4th from the left is save and 5th from the left is save as

or

Ctrl-x Ctrl-s

You can open another file (create another file) with:

the menu Files → Open file

or

the icons – 1st from the left

or

Crtl-x Ctrl-f

There are many commands in emacs but you do not need to know many and the menus can be
used for many things. The menu also tells you the Ctrl commands and you will find it much
faster to use them than the menus when you know them.

Try this: eg


mkdir stock1
cd stock1
ls
emacs fish.txt &
# type something in emacs and save it
ls
Type some columns of numbers (at least 2) into emacs, you can separate them with a ‘tab’, ‘,’
or ‘space’.

and save the file as <filename>.txt


Some other things

Graphics files

Graphs plotted in R and saved to a file are postscript files (they have the file extension .ps).
These files can be viewed using xv which is opened from the command line:

xv file.ps &

To quit xv type q in the window.

Postscript files can be sent to a printer from the command line:

lp file.ps

to send to the default printer. The printer can be selected:

lp -d marbakki file.ps

where marbakki is the name of the printer.


Desktop

You have access to more than one desktop from the toolbar – for example if you are working
on more than one project you can keep the open windows and progams on different desktops.
You can move between desktops by left clicking on the panel or using a keyboard shortcut eg
Crtl Alt right moves from 1 to 4 and Ctrl Alt left moves from 4 to 1.


Directory structure

The File Browser (from the Applications menu) enables you to see your files and directory
structure graphically.


OpenOffice

OpenOffice contains a selection of programs like those available in Microsoft Office eg OpenOf-
fice Writer is for word processing, OpenOffice Calc is a spreadsheet and OpenOffice Impress for
presentations. These are available from the Application menu under Office and the toolbar.

Mais conteúdo relacionado

Mais procurados

intro unix/linux 08
intro unix/linux 08intro unix/linux 08
intro unix/linux 08duquoi
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examplesabclearnn
 
Linux commands part -2
Linux commands part -2Linux commands part -2
Linux commands part -2bhatvijetha
 
intro unix/linux 02
intro unix/linux 02intro unix/linux 02
intro unix/linux 02duquoi
 
Directory Commands - R.D.Sivakumar
Directory Commands - R.D.SivakumarDirectory Commands - R.D.Sivakumar
Directory Commands - R.D.SivakumarSivakumar R D .
 
Common linux ubuntu commands overview
Common linux  ubuntu commands overviewCommon linux  ubuntu commands overview
Common linux ubuntu commands overviewAmeer Sameer
 
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS
 
Linux basics
Linux basicsLinux basics
Linux basicsDeepa
 
Basics of UNIX Commands
Basics of UNIX CommandsBasics of UNIX Commands
Basics of UNIX CommandsSubra Das
 
intro unix/linux 07
intro unix/linux 07intro unix/linux 07
intro unix/linux 07duquoi
 
intro unix/linux 11
intro unix/linux 11intro unix/linux 11
intro unix/linux 11duquoi
 
Unix commands in etl testing
Unix commands in etl testingUnix commands in etl testing
Unix commands in etl testingGaruda Trainings
 
Windows Registry Tips & Tricks
Windows Registry Tips & TricksWindows Registry Tips & Tricks
Windows Registry Tips & TricksRaghav Bisht
 

Mais procurados (19)

Dos
DosDos
Dos
 
intro unix/linux 08
intro unix/linux 08intro unix/linux 08
intro unix/linux 08
 
File handling
File handlingFile handling
File handling
 
Linux basic commands with examples
Linux basic commands with examplesLinux basic commands with examples
Linux basic commands with examples
 
Linux commands part -2
Linux commands part -2Linux commands part -2
Linux commands part -2
 
Dos 16
Dos 16Dos 16
Dos 16
 
intro unix/linux 02
intro unix/linux 02intro unix/linux 02
intro unix/linux 02
 
Unix
UnixUnix
Unix
 
Directory Commands - R.D.Sivakumar
Directory Commands - R.D.SivakumarDirectory Commands - R.D.Sivakumar
Directory Commands - R.D.Sivakumar
 
Common linux ubuntu commands overview
Common linux  ubuntu commands overviewCommon linux  ubuntu commands overview
Common linux ubuntu commands overview
 
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformaticsBITS: Introduction to Linux - Text manipulation tools for bioinformatics
BITS: Introduction to Linux - Text manipulation tools for bioinformatics
 
Linux basics
Linux basicsLinux basics
Linux basics
 
Basics of UNIX Commands
Basics of UNIX CommandsBasics of UNIX Commands
Basics of UNIX Commands
 
intro unix/linux 07
intro unix/linux 07intro unix/linux 07
intro unix/linux 07
 
Linux
LinuxLinux
Linux
 
Basic Linux day 1
Basic Linux day 1Basic Linux day 1
Basic Linux day 1
 
intro unix/linux 11
intro unix/linux 11intro unix/linux 11
intro unix/linux 11
 
Unix commands in etl testing
Unix commands in etl testingUnix commands in etl testing
Unix commands in etl testing
 
Windows Registry Tips & Tricks
Windows Registry Tips & TricksWindows Registry Tips & Tricks
Windows Registry Tips & Tricks
 

Semelhante a Linux OS and Software Guide

The structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformaticsThe structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformaticsBITS
 
11 unix osx_commands
11 unix osx_commands11 unix osx_commands
11 unix osx_commandsMacinfosoft
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbookWave Digitech
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritpingchockit88
 
Mastering the command line for developers by Etietop Demas
Mastering the command line for developers by Etietop DemasMastering the command line for developers by Etietop Demas
Mastering the command line for developers by Etietop DemasEtietop Demas
 
Unix primer
Unix primerUnix primer
Unix primerdummy
 
Unix Lec2
Unix Lec2Unix Lec2
Unix Lec2Dr.Ravi
 
Linux Shortcuts and Commands:
Linux Shortcuts and Commands:Linux Shortcuts and Commands:
Linux Shortcuts and Commands:wensheng wei
 
The Ring programming language version 1.5.4 book - Part 18 of 185
The Ring programming language version 1.5.4 book - Part 18 of 185The Ring programming language version 1.5.4 book - Part 18 of 185
The Ring programming language version 1.5.4 book - Part 18 of 185Mahmoud Samir Fayed
 
Using Unix
Using UnixUsing Unix
Using UnixDr.Ravi
 
Linux administration training
Linux administration trainingLinux administration training
Linux administration trainingiman darabi
 

Semelhante a Linux OS and Software Guide (20)

The structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformaticsThe structure of Linux - Introduction to Linux for bioinformatics
The structure of Linux - Introduction to Linux for bioinformatics
 
Linux Basics
Linux BasicsLinux Basics
Linux Basics
 
11 unix osx_commands
11 unix osx_commands11 unix osx_commands
11 unix osx_commands
 
Linuxs1
Linuxs1Linuxs1
Linuxs1
 
Nithi
NithiNithi
Nithi
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbook
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritping
 
Mastering the command line for developers by Etietop Demas
Mastering the command line for developers by Etietop DemasMastering the command line for developers by Etietop Demas
Mastering the command line for developers by Etietop Demas
 
60761 linux
60761 linux60761 linux
60761 linux
 
Unix primer
Unix primerUnix primer
Unix primer
 
Unix Lec2
Unix Lec2Unix Lec2
Unix Lec2
 
Linux Shortcuts and Commands:
Linux Shortcuts and Commands:Linux Shortcuts and Commands:
Linux Shortcuts and Commands:
 
The Ring programming language version 1.5.4 book - Part 18 of 185
The Ring programming language version 1.5.4 book - Part 18 of 185The Ring programming language version 1.5.4 book - Part 18 of 185
The Ring programming language version 1.5.4 book - Part 18 of 185
 
Linux unix-commands
Linux unix-commandsLinux unix-commands
Linux unix-commands
 
Assignment OS LAB 2022
Assignment OS LAB 2022Assignment OS LAB 2022
Assignment OS LAB 2022
 
Basics of unix
Basics of unixBasics of unix
Basics of unix
 
Linux Basics.pptx
Linux Basics.pptxLinux Basics.pptx
Linux Basics.pptx
 
Using Unix
Using UnixUsing Unix
Using Unix
 
Linux administration training
Linux administration trainingLinux administration training
Linux administration training
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 

Último

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 

Último (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 

Linux OS and Software Guide

  • 1. Linux Linux is a free operating system, I’m not insisting that you use it (after today) but it is useful for you to be aware that free operating systems and software are available. Open–source software can be modified by users as the source code is freely available. A wide variety of open–source software is available including word processing and speadsheet packages. If you have only used Microsoft Windows in the past you might find it difficult to start using Linux but you just need time to familiarise yourself with it. For many tasks, Linux is an easier environment to work in than Windows. When you send email or use the internet you are, indirectly, using open–source software. There are different versions of Linux and the default for your computers is called ‘gnome’. This handout just provides you with basic information required for this course. You do not need to memorise everything, mainly to be aware of what you can do and to know where you can get information. Help with Unix/Linux Some websites which have information on linux, open–source software and basic commands: www.linux.ie/newusers/beginners-linux-guide www.schoolforge.net www.seul.org/edu go.local.net/LinuxGuide/ www.ugu.com www.gnu.com Starting Reboot the computer then select Fedora Core NOT Windows. At the log in screen, change the language to English (using ‘Tungumal’ at the bottom left hand side) – any version. Then log in as normal using your username and password. At the top of the screen there is a toolbar – but this can be dragged to the bottom if you prefer. To open programs you can either use the Applications menu (the Red Hat of the toolbar - left mouse button) or open them from a shell (terminal window). The shell can also execute commands and is a programming environment. It is much faster (and more flexible) to use the shell than the menu. Frequently used programs can also be opened from the toolbar – you can customise this by installing your choice of icons there. To open a shell/terminal window, right click on the background and select ‘open terminal’. The shell/terminal window The shell executes commands: this includes starting programs, moving between directories, creating new directories etc The shell opens automatically in your home directory. As you are working on a laptop your home directory is on the hard disk of the computer. It is better if you work from your home
  • 2. directory on the network as it is backed up regularly and your files will be easily accessible from both Linux and Windows. The path of your network directory is: /nethome/unu/<username> To go to your network directory from the linux shell type: cd /nethome/unu/<username> To return to the home directory on your laptop: cd You can see which directory you are in from the prompt in the shell. Linux is case sensitive ie LS is not the same as ls. Some of the most useful commands are: Some basic shell commands are: lists files and directories ls creates a new directory mkdir <dir> move to new directory cd <dir> move back one directory cd .. move to home directory cd cp <file1> <file2> copy file1 to a new file mv <file1> <file2> move/rename file1 to a new file remove/delete a file rm <file> remove/delete a directory rmdir <dir> There are also further options, known as switches, for these commands, eg: ls -l long list with more information on files such as the owner of the file and when it was last modified ls -a lists all files, not hiding those starting with a . A useful feature of the shell is filename completion, where filenames or directory names are completed for you. eg In your home directory make a new directory called stockassessment (a long name), then change directory into stockassessment mkdir stockassessment cd sto press TAB (above caps lock). If stockassessment is the only option the full name is completed and you can then press RETURN. If there is more than one option starting with ‘sto’, nothing is presented, then if you do Ctrl-d, all options are presented and if you type in more the options will be fewer. If you have another directory in you home diectory called stockmodels, what happens when you use filename completion? Remove these new directories. To repeat or view earlier commands you can use the up arrow (moving back again with the down arrow). Text editors An easy way to write text files is to use a text editor. Commands for R, the statistical package you will be using, are entered on the command line ie you type in the commands directly or read in a file containing commands, you do not use menus. Either to keep a record of your work
  • 3. or to write the R commands into a file you should use a text editor. Then, when you repeat work, or do similar work you will have examples you can work from. Word processing packages should not be used for this purpose. Text editors store text as ASCII which is a more stable format, creates much smaller files using less memory and you don’t have problems reading old files due to upgrades. It is particularly important to store data in stable file formats. Data stored in a spreadsheet such as Excel is more easily corrupted and there can be problems with version changes. Emacs A powerful and easy to use text editor is emacs. Emacs can be opened from the terminal window by typing emacs &. What happens if you don’t use the &? If you type & after a command you can continue to use the terminal when the program is running. To open an existing file called fish (or if you wish to create a new file called fish) type: emacs fish & into the terminal. To save a file in emacs either use the menu: Files → Save Buffer/Save Buffer As or the icons – 4th from the left is save and 5th from the left is save as or Ctrl-x Ctrl-s You can open another file (create another file) with: the menu Files → Open file or the icons – 1st from the left or Crtl-x Ctrl-f There are many commands in emacs but you do not need to know many and the menus can be used for many things. The menu also tells you the Ctrl commands and you will find it much faster to use them than the menus when you know them. Try this: eg mkdir stock1 cd stock1 ls emacs fish.txt & # type something in emacs and save it ls
  • 4. Type some columns of numbers (at least 2) into emacs, you can separate them with a ‘tab’, ‘,’ or ‘space’. and save the file as <filename>.txt Some other things Graphics files Graphs plotted in R and saved to a file are postscript files (they have the file extension .ps). These files can be viewed using xv which is opened from the command line: xv file.ps & To quit xv type q in the window. Postscript files can be sent to a printer from the command line: lp file.ps to send to the default printer. The printer can be selected: lp -d marbakki file.ps where marbakki is the name of the printer. Desktop You have access to more than one desktop from the toolbar – for example if you are working on more than one project you can keep the open windows and progams on different desktops. You can move between desktops by left clicking on the panel or using a keyboard shortcut eg Crtl Alt right moves from 1 to 4 and Ctrl Alt left moves from 4 to 1. Directory structure The File Browser (from the Applications menu) enables you to see your files and directory structure graphically. OpenOffice OpenOffice contains a selection of programs like those available in Microsoft Office eg OpenOf- fice Writer is for word processing, OpenOffice Calc is a spreadsheet and OpenOffice Impress for presentations. These are available from the Application menu under Office and the toolbar.