Using Linux Kaya Oğuz Room: 310.

Slides:



Advertisements
Similar presentations
ITR3 lecture 7: more introduction to UNIX Thomas Krichel
Advertisements

Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
1 Introduction to UNIX Ke Liu
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.
Lesson 22 – Introduction to Linux Systems Administration.
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.
Unix Workshop Aug What is Unix Multitasking, multiuser operating system Often the OS of choice for large servers, large clusters.
Linux Shell. 2 Linux Command-Line Interface ■ Linux shells: A shell is a command interpreter that allows you to type commands from the keyboard to interact.
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
Linux Filesystem Management
The Network Management Lab pc pc pc pc pc Virtual Servers Your Laptop.
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
– Introduction to the Shell 10/1/2015 Introduction to the Shell – Session Introduction to the Shell – Session 2 · Permissions · Users.
Introduction to Computer Organization & Systems Topics: Intro to UNIX COMP John Barr.
2INC0 Operating Systems Introduction to Linux
Linux Shell Programming Tutorial 3 ENGR 3950U / CSCI 3020U Operating Systems Instructor: Dr. Kamran Sartipi.
Introduction to Unix – CS 21 Lecture 9. Lecture Overview Shell description Shell choices History Aliases Topic review.
CS 6560 Operating System Design Lecture 3:Tour of GNU/Linux.
LINUX Tuesday, 5 July :00 pm. Remote Login l Use Secure Shell (ssh) l Machine name/IP address E.g. ssh hydra.sma.nus.edu.sg Or ssh
PROGRAMMING PROJECT POLICIES AND UNIX INTRO Sal LaMarca CSCI 1302, Fall 2009.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
Unix/Linux cs3353. The Shell The shell is a program that acts as the interface between the user and the kernel. –The shell is fully programmable and will.
Next Unix Topics Tuesday, 2/11 & 18/2014. Change Password (by 2/14/14) ssh to account on – faclinux.cse.ohio-state.edu – stdlinux.cse.ohio-state.edu passwd.
Review Please hand in any homework and practicals Vim Scripting Inter-device communication.
Lab 3 + Using the Terminal 1. "Under Linux there are GUIs (graphical user interfaces). where you can point and click and drag, and hopefully get work.
Introduction to Programming Using C An Introduction to Operating Systems.
Linux Commands C151 Multi-User Operating Systems.
Lab 8 Overview Apache Web Server. SCRIPTS Linux Tricks.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
1 Introduction to Unix. 2 What is UNIX?  UNIX is an Operating System (OS).  An operating system is a control program that helps the user communicate.
The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
1 CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
Linux Administration Working with the BASH Shell.
INTRODUCTION TO SHELL SCRIPTING By Byamukama Frank
Linux Workshop Session 2 By Amol and Prem. Overview of Presentation Brief Review Useful tools Remote Access Troubleshooting.
Overview of Linux Fall 2016 Dr. Donghyun Kim
CS1010: Intro Workshop.
Development Environment Basics
slides created by Marty Stepp, modified by Josh Goodwin
Chapter 11 Command-Line Master Class
Andy Wang Object Oriented Programming in C++ COP 3330
UNIX Introduction History Main Features UNIX Operating System
Rootly Powers and Controlling Processes
Some Linux Commands.
C151 Multi-User Operating Systems
Part 3 – Remote Connection, File Transfer, Remote Environments
A Guide to Unix Using Linux Fourth Edition
The Linux Operating System
Shell Script Assignment 1.
Lab 1 introduction, debrief
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
slides created by Marty Stepp, modified by Jessica Miller
Introduction to Computer Organization & Systems
Andy Wang Object Oriented Programming in C++ COP 3330
Working with Mac OS and Linux
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
slides created by Marty Stepp, modified by Jessica Miller
Command line.
CSE 391 Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CSE 303 Concepts and Tools for Software Development
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CSE 391 Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
Linux Filesystem Management
1.3 Given a scenario, apply appropriate Microsoft command line tools
Presentation transcript:

Using Linux Kaya Oğuz Room: 310

GUI vs CLI If you have done your homework, you have used Linux with a GUI (GNOME, KDE, etc) CLI = Command Line Interface Shell: Bash, Sh, Csh, Zsh, etc... Interface between the user and the OS

A Typical Linux System

Users in Linux Superuser (root) Normal user (kaya) A normal user account is used for daily usage of the system. Superuser account is reserved for system administration Every user belongs to one or more groups Linux is very strict about permissions Every file belongs to a user

Becoming 'root' From time to time you may need to become the superuser; for installing applications, setting system settings etc. The commands: su and sudo When you are root, BE VERY CAREFUL! The system considers you know what you are doing and does not ask you 'if you are sure' – it just executes the command!

sudo!

Files -rw-r--r-- 1 kaya kaya 17K :50 kayaoguz.pdf -rw-r--r-- 1 kaya kaya :55 kayaoguz.tex drwxr-xr-x 4 kaya kaya :31 Masaüstü $ chmod 655 dosyaAdi $ chmod 777 dosyaAdi2 $ chmod -R 546 dizinVeIcindekiler

I Know CHMOD!

Hello Bash!

Shell is... An interpreter. It can execute commands. A programming language. It has control structures, loops, variables and NO pointers :) You may try: for i in $(ls); do echo item: $i done

Basic OS Commands Now, let's connect to Zeytin and see them in action! uptime 10:56:41 up 56 days, 36 min, 1 user, load average: 0.23, 0.05, 0.02

Learning More Manuals – the man command gives you more information about a command. Try: man ls man cp Reading the manuals, you can learn about the parameters and other features of the commands.

Redirecting You can redirect the output of a command to a file. For example: ls -l > filesList.txt The '>' directs the output to the file. Here are more keywords for you: stdout, stderr, stdin std=standard

Pipe Pipes let you use the output of a program as the input of another one! Here are a few samples: ls -l | less tcpdump | grep google ps aux | grep java | less Pipes and redirecting will be needed when using tcpdump and analyzing its outputs.

Lab Sessions During lab sessions you will be asked to connect to a network and login to 'Truva' just like I have connected to 'Zeytin' ifconfig To set the connection, you need to use the ifconfig command which requires root administration rights. Typing only ifconfig gives you information about the current interfaces of the system. You will probably see: lo (loopback), eth0 and wlan0 (or eth1, or something similar)

ifconfig Setting an interface: # ifconfig eth netmask To enable / disable an interface # ifconfig eth0 up # ifconfig eth0 down

route The route command shows or manipulates the IP routing table. Its primary use is to set up static routes to specific hosts or networks via an interface after it has been configured with ifconfig (from 'man route') You'll need it when using Truva to access internet in the lab route add default gw

S S H SSH allows you to connect to a remote host. You will use SSH to connect to Truva in the labs. Once connected, you can use the Linux commands on the remote machine. Here is the command: ssh l username

Config Files Remember the folder /etc ? /etc/hosts holds a list of machines. You can add machines. Here's the hosts file on my machine: truva hitit I don't need to write anymore. I can simply write truva.

Config Files /etc/resolv.conf is the file which holds the DNS servers. DNS = Domain Name Server DNS converts domain name to ip. Here is my resolv.conf file: nameserver

More Linux Commands Text editors: vi, vim, pico, nano Changing your password: passwd Print Working Directory: pwd Who are you?: whoami Who is logged in now?: who How long has it been?: uptime System information: uname Listing the tasks, processes: top, ps Stop the processes!: kill, killall

More! How much space?: du, df, free File contents: less Print on screen: echo Path of a command: which Rename command: alias Compressing: tar Links: ln Compiling: gcc, g++, javac

Homework Spend some time on the command line; try using command line applications instead of GUI Create a working directory for IS302, where all your work will be saved Experiment with your network settings from the command line Try the commands that look interesting to you in this presentation, skim over their manuals. And report back what you have done...

Thanks! Kaya Oğuz Room: 310 and you are always welcome!