GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - theshteves/bash-workshop: Notes from my freshman-year talk

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
README.md
README.md
 
 
index.html
index.html
 
 

Repository files navigation

Introduction to Unix Commands

Spartan Hackers

Bash Video

Click the image above to see the screencast!

Windows users should download PuTTY:

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Getting Started (5 minutes)

  • Why bash is important to know
  • Understanding the directory structure (tree)

Remember how, on your Desktop, you can manipulate files and folders?

The entire filesystem for your computer is just a MASSIVE tree of folders and folders with files along the way.

Notable Directories

  • Root "/" - The single folder at the core
  • Home "~" - The folder containing everything for your user
  • Working "." - The current folder you're in

...also, I'm gonna refer to folders as directories here on out.

Bits of Bash (20 minutes)

Got that shell open? Time for some basic navigation!

  • ls - list directory contents
  • cd - change working directory
  • touch - change file access and modification times (creates a file)
  • rm - remove directory entries
  • cp - copy files
  • mv - move files
  • clear - clear the terminal screen

Now that you've got those under your belt, we need to talk about command options- or flags. Flags are how we specify additional parameters to our commands similar to passing arguments to a function in programming.

For example: sure, ls lists directory contents but what if I want to see hidden dotfiles? I can include the -a option:

ls -a

Want a "long" listing with lots of additional system information?

ls -l

But how do we familiarize with all of these hidden options? ...I'm glad you asked.

  • man - format and display the on-line manual pages

Time to wing it

Before we move on, you should copy this document onto your desktop:

curl --location goo.gl/NU44jC > ~/Desktop/unix.txt

This will prove a great resource for you to refer back to if you ever get lost or have any nagging questions after the workshop.

I got you. -Steven Kneiser

My Mysterious & Undisputably Dope Project (10 minutes)

Finally! Time to do something both tangible and dope. First thing we're gonna do is remote into a school server:

ssh [email protected]

After entering your password you should be in your user's home directory (represented by the "~"). Next up, we're gonna make a directory for this project called "web" and hop right in there:

mkdir web
cd web

This seems like the PERFECT place to dump my mysterious & undisputably dope file:

curl --location goo.gl/W5GHZd > index.html

Rubs hands together with a devilish grin

Now before I give anything away, I want you to run these two commands:

chmod -R a+rX ~/web
chmod 701 ~/

Congratulations, you've officially setup your very own student homepage! Don't believe me? Visit:

cse.msu.edu/~your_net_id

Q&A & Unix Tips (25 minutes)

Basic Navigation

  • ls & cd
  • touch & rm
  • cp & mv
  • mkdir & rmdir
  • cat & editors (nano, vim, emacs)
  • understanding flags
  • tab-completion & clear
  • finding help (man, apropos, ...then google)

Bash Redirection & Search

  • piping
  • less/more & head & tail
  • grep
  • sort & awk & wc
  • find

Filesystem security

  • reading access rights
  • chmod
  • sudo & su

Running processes (language-specific consoles etc)

  • jobs (listing and suspending)
  • fg & bg
  • ps
  • sending signals

Customizing your environment (dotfiles)

  • environmental variables (echo & printenv)
  • .profile's & rc's (SHELL-DEPENDENT)
  • aliases & functions
  • SSH & simplifying (.ssh/config)
  • package-management

Advanced Miscellaneous

  • keyboard shortcuts (reverse-i search)
  • curly brace completion
  • bash scripting
  • crontab

Further reading

This Repo

Other Unix tutorials

  • CSE-320 Bash reference READ THIS IF NOTHING ELSE
  • A curated list of awesome command-line guides, frameworks, etc
  • Advancing in the Bash Shell
  • Advanced Bash-Scripting Guide: An in-depth exploration of the art of shell scripting

Other shells

  • Z Shell (zsh) tutorial
  • Great resource for customizing your zsh

More on Unix:

  • Wikipedia - Unix
  • dotJS Talk w/ some historical background knowledge

Learning Vim?

  • My favorite cheatsheet
  • Learn from others' screencasts
  • Advanced vim registers

Miscellaneous

  • Jealous of my colorful bash prompt? Generate a dope one
  • An even more beautiful prompt recommended by @nicovergara
  • Scheduling routine tasks on your crontab
  • Passing command-line arguments to python

About

Notes from my freshman-year talk

Topics

bashdopeeducationhackathonhackersspartanunixworkshop

Resources

Readme
MIT license
Activity

Stars

11 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.