Introduction to Linux and Code Editing

Slides:



Advertisements
Similar presentations
CS1020 Week 3: 29th January 2015.
Advertisements

Linux, it's not Windows A short introduction to the sub-department's computer systems Gareth Thomas.
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Cosc 4750 Getting Started in UNIX Don’t be afraid of the prompt, in linux it can be your best friend. In some cases, the only way to do certain things.
CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
VIM: The basics Tang Wai-Chung, Matthew (MaFai) 29/12/2006.
Working Environment - - Linux - -.
Linux+ Guide to Linux Certification, Second Edition
CS 202 Computer Science II Lab Fall 2009 September 3.
Virtual Machine and UNIX. What is a VM? VM stands for Virtual Machine. It is a software emulation of hardware. By using a VM, you can have the same hardware.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
MCB Lecture #3 Sept 2/14 Intro to UNIX terminal.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction Unix-like system is everywhere Linux Android for smartphones Google Chrome OS for Chromebook Web.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors.
PROGRAMMING PROJECT POLICIES AND UNIX INTRO Sal LaMarca CSCI 1302, Fall 2009.
Intro. To Unix commands For those who’ve never used Unix before Quick tutorial to let you move around your Unix Accounts No discussion of inner workings.
Natawut NupairojAssembly Language1 Unix Survival Guide.
ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Usage of Workstation Lecturer: Yu-Hao( 陳郁豪 ) Date:
1 Lab 2 “Hello world” in Unix/Linux #include "std_lib_facilities_4.h" int main(){ cout
Unix and Samba By: IC Labs (Raj Kidambi). What is Unix?  Unix stands for UNiplexed Information and Computing System. (It was originally spelled "Unics.")
Object Oriented Programming COP3330 / CGS5409.  Assignment Submission Overview  Compiling with g++  Using Makefiles  Misc. Review.
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
1 Getting Started with C++ Part 2 Linux. 2 Getting Started on Linux Now we will look at Linux. See how to copy files between Windows and Linux Compile.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
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.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
Learning Unix/Linux Based on slides from: Eric Bishop.
ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Usage of Workstation Lecturer: Yu-Hao( 陳郁豪 ) Date:
Object Oriented Programming COP3330 / CGS5409.  Assignment Submission Overview  Compiling with g++  Using Makefiles  Misc. Review.
Assignprelim.1 Assignment Preliminaries © 2012 B. Wilkinson/Clayton Ferner. Modification date: Jan 16a, 2014.
Review Why do we use protection levels? Why do we use constructors?
Tutorial Six Linux Basics CompSci Semester Two 2016.
By Jonathan Rinfret UNIX/LINUX By Jonathan Rinfret
Introduction to Unix for FreeSurfer Users
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.
Class Projects and Environment
SEEM3460 Tutorial Unix Introduction.
CS1010: Intro Workshop.
Development Environment Basics
Web Programming Essentials:
Tutorial 2 Programming Editors Recommendation & Cordova Plugin Installation and Management Li Xu Department of Systems Engineering.
Andy Wang Object Oriented Programming in C++ COP 3330
Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors.
Part 3 – Remote Connection, File Transfer, Remote Environments
Assignment Preliminaries
Introduction to Computers
Tutorial of Unix Command & shell scriptS 5027
Tutorial of Unix Command & shell scriptS 5027
Intro to UNIX System and Homework 1
Text Editors Vim (Chapter 6) Emacs (Chapter 7)
Web Programming Essentials:
Tutorial of Unix Command & shell scriptS 5027
Emacs CSC 135.
A Brief Overview of Unix
CPSC 233 Tutorial 1 January 19th, 2015.
Andy Wang Object Oriented Programming in C++ COP 3330
UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill.
Class Projects and Environment
Command line.
CSE 303 Concepts and Tools for Software Development
Video Notes.
Lab 2: Terminal Basics.
CSCI The UNIX System Editing files
DIBBs Brown Dog Tutorial Setup
Presentation transcript:

Introduction to Linux and Code Editing CS Bootcamp Introduction to Linux and Code Editing

Some quick things If you have used Linux and worked with it remotely (Ubuntu, Debian, RedHat, etc.) this presentation isn't meant for you. Please stop me to ask questions. Use your resources. This will be recorded, and the slides/materials will be publicly posted for your viewing pleasure.  Materials - https://csit.kutztown.edu/UNIXbootcamp/index.html  Student Resources - Maintained by the CSIT Department

Linux Linux is another type of operating system, just like Windows or MacOS.  Command Line Overview Linux and Kutztown The CSIT faculty and students have access to multiple servers The two main ones: csitrd - (a.k.a. acad, csit, login, unixweb) &       Mcgonagall (a.k.a. Kupapcsit01) 

Connecting to CSIT Windows – Additional Setup Required Personal Laptop  Follow link to install PuTTY in materials   Profile Setup Walkthrough   Lab Computers   Profiles already setup, open PuTTY and double click "acad no x11" MacOS / Linux  Just need to use the terminal  ssh username@host I.e. ssh pearl464@csit.kutztown.edu

After Login Scenario One: Enter these commands wget https://csit.kutztown.edu/UN IXbootcamp/materials/.bashrc source  .bashrc Your bash should be properly setup now Scenario Two: If your prompt looks like this, you're golden :-) 

Commands Overview Some terminology: Directory (a folder) – Just like your folders in Mac's Finder or Window's File Explorer. Stores multiple files "~" - Your home directory Structure of command: ls  [space]  -al   [space]  ~ command  [options]     [file]

Common Commands pwd "Print working directory" Current directory that your bash prompt is at ls "List directory contents" Shows files and directories within the given directory. Defaults to the current working directory  Common options: -a – Lists all files and directories (Even hidden if you have permission) -l – Formats the output as a list  mkdir  Creates a new directory  Example: mkdir ~/csc135 Will make a new directory called "csc135" located in your home 

Command Commands (cont.) rm  Remove file Options: -r – Recursive. Used to remove multipe files -f – Force removal of a file NOTE: Be careful using the –f option. Once a file is deleted, there is a slim chance it can be recovered.  Example: rm test.txt man  Provides the manual page for a given command. Very useful if you need to understand how a command works and what the options for it are. 

G++ GNU Compiler Basic format: g++ <filename> Results in a.out G++ has many features built in -o allows you to name your compiled program: Example: g++ p1.cpp -o p1 will give you an executable called p1 -d to enable debugging This will keep function/variable names with the executable allowing you to debug your program (Don't worry if you don't know all these terms yet) See the man page for more features

File Transfer – Work with files locally FileZilla Client – MacOS and Windows - https://filezilla-project.org/ https://wiki.filezilla-project.org/FileZilla_Client_Tutorial_(en) Tutorial (For Later Reference)  WinSCP – Windows Only - https://winscp.net/eng/download.php  https://winscp.net/eng/docs/start - Documentation (For Later Reference)

Picking a Text Editor Pick the right tool for your job Make things better for yourself: ***Learn keyboard shortcuts*** Plugins Themes Make your editor part of your workflow Shortcuts speed things up Command Line vs GUI

Text Editing – Command Line vim emacs Quick and fast Editor Exiting: <ESC> :q Most of the faculty use it Flexible and powerful – An IDE Exiting: Cntl-X Cntl-C More Resources:  Emacs Guide Tutorial: https://www.gnu.org/software/emacs/tour/  Interactive Vim Tutorial: https://www.openvim.com/  Image Source: https://unix.stackexchange.com/questions/986/what-are-the-pros-and-cons-of-vim-and-emacs/988#988 

Notepad++ Pros Cons Free forever Fast/lightweight FTP Capabilities No Git support Windows only Bad plugin support Dated UI

VSCode Pros Cons Free/Open Source Great plugin options Built-in terminal Git support Modern and customizable UI Windows, macOS, Linux No default FTP (3rd party plugins available) Built on Electron, a RAM hog

Handy Keyboard Shortcuts Select next instance of word (multi- cursor): Sublime, VSCode: CTRL+D Duplicate Line: Sublime: CTRL+Shift+D VSCode: Shift+Alt+Down or Shift+Alt+Up Notepad++: CTRL+D Emacs: C-a C-SPACE C-n M-w C-y Emacs Commands: C (short for CTRL) M (short for Meta, either Alt or ESC) C-a – move cursor to start of line C-Space – sets a mark to begin selection ("start highlighting") C-n – move cursor to next line M-w  - copy highlighted region C-y – paste (stands for "yank") C-k – cut ("kill") the rest of the line The point is to learn ways of speeding up repetitive tasks!

Demo