Difference between revisions of "Basic Linux Seminar"

From UW-Math Wiki
Jump to: navigation, search
Line 22: Line 22:
 
* nano nameoffile
 
* nano nameoffile
 
* nano is a simple (and one of many) text editor, vi, emacs, joe, etc.
 
* nano is a simple (and one of many) text editor, vi, emacs, joe, etc.
 +
Moving/Copying/Deleting files
 +
* mv
 +
* cp
 +
* rm
 
Listing contents of your directory
 
Listing contents of your directory
 
* ls
 
* ls
 +
** does not show hidden files/folders
 
* use of option flags to see more
 
* use of option flags to see more
 
* ls -l
 
* ls -l
 
* ls -la
 
* ls -la
 +
** does show hidden files/folders
 
* ls -last
 
* ls -last
 
+
** shows most recently changed/create at top
# Moving around your home directory; pwd
+
Permissions
# Moving items in your home directory (2 methods); relative; absolute
+
* ls -l shows you the permissions
# Listing items in your home directory; Listing with command line options.
+
* discussion of what those permissions mean.
# Removing directories and files (use caution!)
+
** letter method
# Permissions; recursive, letter method, number method
+
** number method
# Touch command.
+
* chmod changing permissions
# Man command
+
Man command
# Printing items in your home directory to a printer via command line
+
Less command
# using lpq to see items in the print queue
+
Grep command
# using lprm to remove items in the print queue.
+
Piping
# editing a file using nano
+
cron
# more about file editors.
 
 
# make your own script
 
# make your own script
 
# quota command; du -s subdir
 
# quota command; du -s subdir
 
# locate command
 
# locate command
 
#
 
#

Revision as of 11:07, 15 January 2017

January 16, 2017 from 10am to 12pm, B107 Van Vleck

Connecting to a linux machine via ssh.

  • hand out account credentials for non-math attendees
  • explain Linux vs. Unix, open source

Using SCP to move items from your machine to the server, using sFTP, Filezilla, SecureFX

  • Terminal on mac, linux
  • download and install SSH program (like SecureCRT) for Windows.

pwd

  • landing zone
  • where am I

cd

  • changing directories
  • shortcuts for changing directories
    • ~, ., ..,
  • tab completion

Creating/removing directories

  • mkdir
  • rmdir

Creating files

  • touch
  • nano nameoffile
  • nano is a simple (and one of many) text editor, vi, emacs, joe, etc.

Moving/Copying/Deleting files

  • mv
  • cp
  • rm

Listing contents of your directory

  • ls
    • does not show hidden files/folders
  • use of option flags to see more
  • ls -l
  • ls -la
    • does show hidden files/folders
  • ls -last
    • shows most recently changed/create at top

Permissions

  • ls -l shows you the permissions
  • discussion of what those permissions mean.
    • letter method
    • number method
  • chmod changing permissions

Man command Less command Grep command Piping cron

  1. make your own script
  2. quota command; du -s subdir
  3. locate command