SlideShare a Scribd company logo
1 of 4
Download to read 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.

More Related Content

What's hot

Linux basics
Linux basicsLinux basics
Linux basics
Deepa
 
Windows Registry Tips & Tricks
Windows Registry Tips & TricksWindows Registry Tips & Tricks
Windows Registry Tips & Tricks
Raghav Bisht
 

What's hot (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
 

Similar to help with Linux/Unix starting

Unix primer
Unix primerUnix primer
Unix primer
dummy
 
Unix Lec2
Unix Lec2Unix Lec2
Unix Lec2
Dr.Ravi
 
Linux Shortcuts and Commands:
Linux Shortcuts and Commands:Linux Shortcuts and Commands:
Linux Shortcuts and Commands:
wensheng wei
 
Using Unix
Using UnixUsing Unix
Using Unix
Dr.Ravi
 

Similar to help with Linux/Unix starting (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
 

Recently uploaded

Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
UK Journal
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Recently uploaded (20)

State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 

help with Linux/Unix starting

  • 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.