Linux Survival Guide 3. Essential Linux Commands 2018 Fall Computer - - PowerPoint PPT Presentation

linux survival guide
SMART_READER_LITE
LIVE PREVIEW

Linux Survival Guide 3. Essential Linux Commands 2018 Fall Computer - - PowerPoint PPT Presentation

Dept. of Computer Science & Engineering @ Seoul National University Linux Survival Guide 3. Essential Linux Commands 2018 Fall Computer Concept & Practice Prof. Sang Lyul Min TA: Minwook Kim (ace@snu.ac.kr) Linux Commands CLI


slide-1
SLIDE 1
  • Dept. of Computer Science & Engineering

@ Seoul National University

Linux Survival Guide

  • 3. Essential Linux Commands

2018 Fall Computer Concept & Practice

  • Prof. Sang Lyul Min

TA: Minwook Kim (ace@snu.ac.kr)

slide-2
SLIDE 2
  • Dept. of Computer Science & Engineering

@ Seoul National University

Linux Commands

  • CLI (command line interface)
  • To interact with the server, our terminal provides mainly CLI.
  • So we should be familiar with the Linux commands!
  • List of Linux commands
  • You can find almost the whole Linux commands here:
  • https://fossbytes.com/a-z-list-linux-command-line-reference/
  • Do we need them all?
  • Tips
  • Commands are case-sensitive.
  • Some useful functions ( in bash shell )
  • Up arrow key loads the previous commands.
  • Tab key provides the autocomplete function.
  • <ctrl> + <c> = cancel the running command, <shift> + <insert> = paste
  • When you need help to use some command, type
  • <command> + < - - help >

OR <man> + <command>

2

slide-3
SLIDE 3
  • Dept. of Computer Science & Engineering

@ Seoul National University

Directories

  • ls
  • lists the contents of your current working directory.
  • mkdir / rmdir
  • makes or removes subdirectory in your current working directory.
  • usage) mkdir [destpath]
  • cd
  • changes working directory from current.
  • usage) cd [destpath]
  • pwd
  • prints the path of working directory
  • Path Shortcuts
  • . = current directory
  • .. = parent directory
  • / = root directory
  • ~ = home directory

3

slide-4
SLIDE 4
  • Dept. of Computer Science & Engineering

@ Seoul National University

Files

  • cp
  • makes a copy of a file or directory.
  • usage) cp [origfilepath] [destpath]
  • mv
  • moves a file or a directory from one place to another, or change the name.
  • usage) mv [origfilepath] [destpath]
  • cat
  • concatenates a file to standard output.
  • usage) cat file
  • File upload / download ( in local terminal )
  • usage) scp [origfilepath] [destpath]
  • ex) scp /users/ta/desktop/file.txt std10000@ccp.snucse.org:/home/std10000
  • How to make files?

4

slide-5
SLIDE 5
  • Dept. of Computer Science & Engineering

@ Seoul National University

vi editor & vim

  • What it is?
  • a terminal text editor originally created for the Unix operating system.
  • Modes
  • command mode (initial mode you will be in first)
  • insert mode
  • Basics
  • vi <filename>
  • You can make a new file or modify existing file.
  • To change modes,
  • command → insert : press [i] key
  • insert → command : press <ESC> key
  • In the command mode,
  • <:q> : quit, <:q!> : quit without saving, <:wq> : quit with saving, <:w> : just save
  • <u>: undo, <ctrl+r> : redo

5

slide-6
SLIDE 6

6

꼭 기억해야 할 것

  • File & Directory commands
  • ls, mkdir, rm, cd, pwd
  • cp, mv, cat
  • path shortcuts: . .. / ~
  • vim
  • input mode & command mode
  • commands ( in command mode )
  • :q :q!

:wq :w u ctrl+r