Introduction to Unix for FreeSurfer Users

Slides:



Advertisements
Similar presentations
Linux, it's not Windows A short introduction to the sub-department's computer systems Gareth Thomas.
Advertisements

Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Linux & Applications Sean GavinWayne State University multi-user environment -- log in: user name and password -- you never turn the computer on or off.
Very Quick & Basic Unix Steven Newhouse Unix is user-friendly. It's just very selective about who its friends are.
Unix Tutorial for FreeSurfer Users
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Introduction to Linux Workshop February Introduction Rob Lane & The HPC Support Team Research Computing Services CUIT.
Unix Tutorial for FreeSurfer Users Allison Stevens.
© Crown copyright Met Office An Introduction to Linux PRECIS Workshop, University of Reading, 23rd – 27th April 2012.
UNIX command line. In this module you will learn: What is the computer shell What is the command line interface (or Terminal) What is the filesystem tree.
Welcome to Linux & Shell Scripting Small Group How to learn how to Code Workshop small-group/
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction Unix-like system is everywhere Linux Android for smartphones Google Chrome OS for Chromebook Web.
Unix Tutorial for FreeSurfer Users. Helpful To Know FreeSurfer Tutorial Wiki:
Unix Tutorial for FreeSurfer Users. Helpful To Know FreeSurfer Tutorial Wiki:
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
UNIX/LINUX SHELLS.  “A Unix shell is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and.
1 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
Processing Your Own Data With FreeSurfer, certain variables must be set in order to use it correctly: FREESURFER_HOME SUBJECTS_DIR tell Operating System.
Unix and Samba By: IC Labs (Raj Kidambi). What is Unix?  Unix stands for UNiplexed Information and Computing System. (It was originally spelled "Unics.")
Intro to Programming Environment 1. Today You Will Learn how to connect to a machine remotely with “nomachine NX client” Learn how to create a new “source.
Lecture One. Objective: Provide description of the Command-Line Editor of Linux operating system. Enable students to understand the practical side of.
Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason.
COP3502: Introduction to Computer Science Yashas Shankar Lecture #2.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop III - Part A Shell Commands Professional Training.
More Unix Naomi Altman. Directories Directory = folder mkdir - makes a new directory rmdir - removes an empty directory cd mydirectory - moves you into.
Linux+ Guide to Linux Certification, Second Edition Chapter 4 Exploring Linux Filesystems.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
The Unix File sytem. Introduction Tree structure …
ICE UNIX TUTORIAL. File System Commands cd – change directory cd – change directory ls – list contents ls – list contents rm – remove/delete rm – remove/delete.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
Learning Unix/Linux Based on slides from: Eric Bishop.
Introduction to LINUX command line Allegra Via IBBE, National Research Council, Italy Sapienza Università di Roma, Italy EMBO Practical Course on Computational.
CMSC 104, Version 9/011 Operating Systems and Using Linux Topics What is an Operating System? Linux Overview Frequently Used Linux Commands Reading None.
Bash Scripting CIRC Summer School 2016 Baowei Liu CIRC Summer School 2016 Baowei Liu.
UNIX Basics Matt Hayward October 18, 2016 LS560 – Information Technology for information professionals.
GRID COMPUTING.
ENEE150 Discussion 01 Section 0101 Adam Wang.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
CS1010: Intro Workshop.
Development Environment Basics
CIRC Winter Boot Camp 2017 Baowei Liu
Getting started with CentOS Linux
Commands Basic syntax of shell commands UNIX or shell commands have a basic structure command -options target command comes first (such as cd or ls) any.
Web Programming Essentials:
Prepared by: Eng. Maryam Adel Abdel-Hady
Andy Wang Object Oriented Programming in C++ COP 3330
Linux/Unix - Download Ubuntu Linux :
Some Linux Commands.
The Command Prompt Commands are the way to “do things” in Unix
Eric Shook Department of Geography Kent State University
The Linux Operating System
Assignment Preliminaries
Shell Environments.
UNIX Basics Internet Technology.
WELCOME FREESURFER COURSE ATTENDEES!
WELCOME FREESURFER COURSE ATTENDEES!
LING 408/508: Computational Techniques for Linguists
Introduction to Linux Week 0 - Thursday.
Operating Systems and Using Linux
Operating Systems and Using Linux
Web Programming Essentials:
A Brief Overview of Unix
Getting started with CentOS Linux
Andy Wang Object Oriented Programming in C++ COP 3330
CSE 303 Concepts and Tools for Software Development
Module 6 Working with Files and Directories
Lab 2: Terminal Basics.
Presentation transcript:

Introduction to Unix for FreeSurfer Users

What is Unix/Linux? An operating system (like Windows and OS X) Linux is the free, modifiable, and redistributable version of Unix Why use it?

What is Unix/Linux? An operating system (like Windows and OS X) Linux is the free, modifiable, and redistributable version of Unix Why use it? power to write many scripts with many commands to work with lots of data to use computer resources on the network efficiently, such as clusters

Getting Started For course-provided Linux computers: Communicate with operating system through a “shell” or terminal window. For course-provided Linux computers: Double click Terminal icon on Desktop For Macs: Applications > Utilities > XQuartz (double click) Applications > Utilities > Terminal

Linux Desktop

Directories (think folders in Windows) Unix uses a hierarchical file system (think folders in Windows)

Directories (think folders in Windows) Unix uses a hierarchical file system (think folders in Windows) Home is like “My Computer”

Directories (think folders in Windows) Unix uses a hierarchical file system (think folders in Windows) Home is like “My Computer” Like “My Documents”

Directories Unix uses a hierarchical file system (think folders in Windows) Home is like “My Computer” Like “My Documents” Like “My Photos”

Directories Unix uses a hierarchical file system (think folders in Windows) Home is like “My Computer” Like “My Documents” Like “My Photos” picture.jpg

command -option1 –option2 file Anatomy of a Command command -option1 –option2 file command - -help

command -option1 –option2 file Anatomy of a Command command -option1 –option2 file command - -help Try: ls --help

shows “present working directory” or current location as a path Type: and hit enter. Should see shows “present working directory” or current location as a path /Users/YourName OR pwd /home/nmrclass

Navigating Directories “change directory”: move into a folder “list”: see contents of directory cd __ ls ls __

Navigating Directories “change directory”: move into a folder “list”: see contents of directory cd __ ls ls __ Desktop matlab tmp TUTORIAL_DATA

Directory Contents List contents of directory you are in lists names of directories/files ls ls -a ls -l ls -lrt

Directory Contents List contents of directory you are in lists names of directories/files lists hidden files too ls ls -a ls -l ls -lrt .cshrc .bashrc .alias

Directory Contents List contents of directory you are in lists names of directories/files lists hidden files too lists file details drwxrwx--- ls ls -a ls -l ls -lrt user group others

Directory Contents List contents of directory you are in lists names of directories/files lists hidden files too lists file details lists recent files last ls ls -a ls -l ls -lrt

Save Some Time Filename Completion hit Tab key should see hit enter History hit key should see ls Des ls Desktop ls Desktop

/home/nmrclass/practice Changing Directories makes a new directory “practice” changes to directory “practice” mkdir practice ls -lrt /home/nmrclass pwd should see cd practice pwd /home/nmrclass/practice should see ls should see Nothing!

Changing Directories

Changing Directories makes folder “stuff” inside practice mkdir stuff makes folder “stuff” inside practice ls should see “stuff”

/home/nmrclass/practice/stuff Changing Directories shows one directory up ls .. can also do (but don’t right now): cd .. cd ../.. ls ../.. goes up two! pwd /home/nmrclass/practice/stuff should see

Format > Make plain text Using an Editor emacs mynotes.txt open -e mynotes.txt If using a Mac: Type: I could write a script. File > Save (Buffer) File > Exit emacs should see “mynotes.txt” Format > Make plain text File > Save ls

Format > Make plain text Using an Editor gedit mynotes.txt open -e mynotes.txt If using a Mac: Type: I could write a script. File > Save (Buffer) File > Exit emacs should see “mynotes.txt” Format > Make plain text File > Save ls

Using an Editor

Copying files is the copy command learn all the options or “arguments” cp cp --help learn all the options or “arguments” cp mynotes.txt stuff cd stuff ls more mynotes.txt

Copying files is the copy command learn all the options or “arguments” cp cp --help learn all the options or “arguments” cp mynotes.txt stuff cd stuff ls less mynotes.txt

Copying / Moving files Could also use do: cp mynotes.txt myothernotes.txt mv myothernotes.txt hernotes.txt mv hernotes.txt ..

Removing Files pwd should be in “stuff” ls rm mynotes.txt ls

Things to know Case sensitive Does not like spaces in file names (e.g. filename.txt vs. file name.txt) Ctrl+c kills a process & brings back command prompt Type ‘q’ to quit the program ‘less’ Highlight & middle click to copy & paste Use ‘&’ to open a program in the background Cannot open a 2nd program if do not have a command prompt

Review no double clicking mkdir ls cd pwd emacs, gedit, vi, pico cp rm

Using FreeSurfer tell Operating System where FreeSurfer is With FreeSurfer, certain variables must be set in order to use it correctly: FREESURFER_HOME SUBJECTS_DIR tell Operating System where FreeSurfer is tell FreeSurfer where data is

To use FreeSurfer you’ll have to do: Required Variables To use FreeSurfer you’ll have to do: setenv FREESURFER_HOME /home/apps/freesurfer tell Operating System where FreeSurfer is source $FREESURFER_HOME/SetUpFreeSurfer.csh source this script to get your computer ready to use FreeSurfer (sources other scripts & sets other variables) setenv SUBJECTS_DIR /path/to/data

To use FreeSurfer you’ll have to do: Required Variables To use FreeSurfer you’ll have to do: export FREESURFER_HOME=/home/apps/freesurfer tell Operating System where FreeSurfer is source $FREESURFER_HOME/SetUpFreeSurfer.csh source this script to get your computer ready to use FreeSurfer (sources other scripts & sets other variables) export SUBJECTS_DIR=/path/to/data

setenv SUBJECTS_DIR /path/to/data Required Variables To go to location of your data: $ means take the value of the variable setenv SUBJECTS_DIR /path/to/data cd $SUBJECTS_DIR

setenv SUBJECTS_DIR /path/to/data Required Variables To go to location of your data: $ means take the value of the variable setenv SUBJECTS_DIR /path/to/data cd $SUBJECTS_DIR aka cd /path/to/data

setenv TEST_VARIABLE yourname $ How ‘echo’ works: To set a variable: To check what a variable is set to: echo anything setenv TEST_VARIABLE yourname echo $TEST_VARIABLE

echo $FREESURFER_HOME Required Variables With FreeSurfer, certain variables must be set in order to use it correctly: FREESURFER_HOME SUBJECTS_DIR tell Operating System where FreeSurfer is tell FreeSurfer where data is To check variables echo $FREESURFER_HOME echo $SUBJECTS_DIR

More Help http://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/Command LineNavigation Homework packet Links on Wiki under “Unix Tutorial” Glossary of Unix commands

The End Good Luck!