Girl Develop It! Boise



Girl Develop It! Boise

1 1


gdi-linux-intro


On Github duallain / gdi-linux-intro

Girl Develop It! Boise

  • boise@girldevelopit.com
  • http://girldevelopit.com
  • https://github.com/gdibois

Welcome!

Girl Develop It is here to provide affordable and accessible programs to learn software through mentorship and hands-on instruction.

Some "rules"

  • We are here for you!
  • Every question is important
  • Help each other
  • Have fun

Welcome!

Tell us about yourself.

  • Who am I?
  • Who are you?
  • What do you hope to get out of the class?

What we will cover today

  • What is linux and why should we care?
  • Basics of linux -- the essential commands
  • Installing and Configuring Software

What is Linux?

It's a operating system/group of software

What is an operating system

A way to interact between hardware and software

Examples: Windows, OS X, Solaris

What is a distro

A grouping of software often

Examples: Debian, Ubuntu, CentOS, Fedora, Gentoo, FreeBSD

What makes them different?

Open source software

Free as in Speech, Free as in beer (~Stallman)

Software built by open source communities: Linux (all distros), Apache, Mysql, Firefox, Python

What can you use linux for

As a dev box

As a platform for applications you write

Embedded systems

Connecting to a playground

Connecting with Mac/Linux

Open Terminal

ssh user@ip

Connecting with Windows

Download and install putty

Type in ip/hostname, click open

General Information

Interacting with a program

l vs ls

ls vs ls -al

Tab Completion

Press tab once

Press it twice

Sudo

two types of users, regular and super

Best practice is to live as regular

And elevate to superuser only when need

sudo = super user do

Reading more

Man Pages

Example:

man ls

Searching the internet

Navigating

Listing Files/Directories

ls

Changing Directories

cd #{name}

Example:

cd gdi

.directories

directories that start with a "." are hidden from ls

Creating Structure

Making directories

mkdir #{name}

ls

mkdir gdi

ls

deleting files

rm -r #{name}

rm -rf gdi

Different big folders

/home/#{user}

/etc/

/tmp/

Editing files

cat

cat #{filename}

nano

nano #{filename}

ctl+x

vim

vim #{filename}

Modes??!??

`i` to type

esc :wq to 'write' and 'quit'

ftp/rsync/etc

A common workflow is to setup autosyncing and edit on your box

Can also be used with git/hg/svn/etc

File Permissions

Owner/Group/All

ls -al

chown

r/w/x

Read/Write/Execute

chmod

Example:

chmod +r gdi

Octals

1 = execute

2 = write

4 = read

Installing Software

From package manager

Killer feature

Different for each distro

ubuntu - apt

sudo apt-get install #{package}

Example:

sudo apt-get install sublime

centos/redhat - yum

sudo yum install #{package}

From Source

Why prefer the package manager to source?

Why may you need to install from source?

Configuring Software

Config Files

programs settings

'Configuring a system'

programs settings

edit /etc/hosts

ping madeupurl

Example:

ping google.com

Reading Logs

Where do they live?

/var/log

can be configured

./

How to read

Favorite text editor

cat, less, more

tail -f

Environment Variables

Inline

thing=foo

bash.rc

export thing=foo

/etc/environment

sets for everyone on system

Special Environment Var

PATH

HOME aka ~

Reading Var

echo $PATH

General Advanced Useage

alias(es)

define them in line

keeping them around

Bashrc/profile

Setting/changing Path

Setting/changing other Env Variables

Creating Bash Scripts

#!/bin/bash

glob

ls * vs ls test*

screen

dealing with bad wifi

multiuser

cron

running perodic jobs, like backups

sending to background

&

fg

Poll

Making Websites (HTML/Javascript/CSS/python)

Automatically making linux boxes (chef)

Other

Girl Develop It Boise --