User Tools

Site Tools


opus:spring2015:sarnol15:journal

UNIX/Linux Fundamentals Journal

MONTH Day, YEAR

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

Week 1: Enter the Ghetto

I know some linux by running it at home. I don't know a lot of commands on terminal other then the ones I learned from data structures. I am kinda excited for the course because I want to ween my self off Windows, especially after the issues I have had on 8.1. I think this course will be fun. Here below is somethings we went over in class today. Going over mostly commands.

Get to know the slang around the area if you want to survive.

ssh lab46: Enter lab46.

passwd: reset password

cd: takes you back to home

cd .. : back a file.

touch file: make a file named File. Linux dont care about extensions. Extensions are for posers.

ls: show files.

ls -l : more details in files such date modified and permissions

              R W X show what Permissions are
              R you. 
              W world
              X no-one. 
              

nano file: inferior word editor.

cat file: opens a quick view of files.

cp file file2: takes 2 arguments first is what is copied seconds is the name of the copy.

rm file: removes file

mkdir : makes directory or file

mv file stuff : moves the file, 2 arguments first is file and second is the folder.

man ls : look up the manuel page to LS and other commands.

logout , exit , ctrl-d : logs you out.

Week 2: Delving In deaper Ghetto

I am pretty fimilar with most basic linux/unix commands.

Type of Files use ls-l to see what type. you will see something like this drwxr-xr-x. The last nine have to deal with file permisions adn the first

-Regular(-) - things that you probably use regualry and save on your usb….Jpg. mpg, mp4

-Directory (l,d)- metadata, contain or refers to other files includes symbolic links (which windows calls shortcut)

-special (p,s,b,c) - things like a keyboards, mouse, partitions of hardrives,

New Lingo. file- that will try to tell you what the file. used like file filename.

who- tells you who is on.

write- Message somone on lab46. used Ie write mmerrick. Hey.

apropos - search the manuel. wc -l - word cound th

Unix Philosphy

  • everything is a file. -from printers, to camaras, to keyboards to your mothers mp3's of Aerosmith.
  • Small is beautiful. -things should only do what they should do… looks at commands like ls it is only kb long not mb long. while modern day software is getting bigger ie games. unix tries to keep it small and not bunddle uneeded features.
  • Do one thing and do one thing extremely well

Files to know stdin - default input file, ie keyboard stdout - default output, ie terminal/scree stderror - standard error.

I/O redirection “<” -redirct STDIN from a file (read)

“>” - relocate std out to file (write, overwrite) ( will wipe it out )

“2>” - redierect std error to file (write, overwrite)

“»” - Redirected appening std out, ( will save what you got) (write)

“2»”

used ie. who > testfile

Week 3: Baptized in the unix

I am struggling with some of the option commands and knowing how or when to use them. things like tar -XCFZ totes does not work. So I am hoping to figure out how to use it and figure out why that command does not work. This week we are learning about the text editor ever….better then any microsoft office program….better then nano….VI.

Stuff that is important to a word editor

(command mode) copy paste search saving loading exiting

(Naviagation)

j,j,k,l - move left down up right

w,W -by word

b,B -by word

1G move to first

(editing)

cw, cW, cb, cB change by word.

x,X delete by character

dd- cut by line

p - past

s -delete characters and puts in insert.

yw, yb, yy, - yank! or copy.

(insert mode)(this is a seperate catagory)

use for inserting text

i,i ( curser before)

a, A(curser moves over),

insert- puts you in inserts,

O, O- open a newline below,

8~ - hellp there

8 » - greater then

/ asdf - search for word

:w - saved if there was a previous

:w asdf - saves file as asdf

:q quit

:q! quit with out saving

:wq save quit. NOT :qw stupid. just no, no.

:1,3co15 - copy lines 1-3 to line 15.

:%s/a/the/g - searches entire file for a with the and all matches on each line (no g only the first one)

:%/./DEADBABY/G replaces all with dead baby

first word editors alowed only line editing. ie editing one line at a time. that is where our prized Ed VI comes in. Ed Vi allows you to preform text manipulations across the screen. Vi has moded editing…

Week 4: Ninjas in the BASH shell

working on the first puzzle box project. I was having difficulty with a file that making.waves which actually was not a .wav file but a text file with encoding. So confusing. but a good way to check that is using the file command. it comes in handy a lot actually. I am getting the hang of using alpine and the terminal. I can manuever through files pretty quickly which is good. I dont have to look up commands to copy list remove make files or directores. I downloaded Kali, tails and ubuntoo on my computer just to mess around. I kinda like tails in a way. just because it is quck and has a windowns disguise desktop, so it is easier to manuever and find things using windows logic on a unix system.

Whatever you can do in a command line you can do in a shell script.

sh- bournshell, one of the first shells

csh - has c like shell cshell lol.

bash - bourne again shell, I see what you did there….scripting shell, we use.

ssh - hollow shell, fancy terminal shell, needs another shell

fish - has funky ascii shell.

tcsh -

zsh -

tradationally people name files accordingly, they are not file extensions but just the name. .sh

.csh

.bash

hmm what is this? #! some people call this #! shhhbang # shhh ! bang #!shhbang

mini programm example

#!/bin/bash

#comment

#my first bestestest script ever.

echo -n “What is your name? ” - prints

read name - print name

cd $name - would try to go to that location

echo “ HI, $name, how are you? ”

exit 0 - exit. change permissions to run this chmod 700 bashexample.bash ./bashexample

Week 5, Deal Again

I finished the first puzzle box.It took a lot of time but I think I figured it out. I think. It was kinda hard but really fun in a way. Matt released the second puzzle box and I started looking at it. I can tell already I probably am not going to like the puzzle box projects.

Wildcards: * shows 0 or more of anything ? 1 of any single character [] character class 1 of any enclosed characters [^] inverted charter class. not maditiory enclosed

for instance ls ??? shows any three letter file

ls T?? C?? show all three character all characters ls [tc]?? same as above but more effictient and more optimized by using wildcards. ls [a-c m-q x-z]?? shows within the ranges of A - C M- q and X -Z 3 letter file. ls [^aeiou][^aeiou][^aeiou] shows file with no vowels and is three letters. ls ????* | wc -w show number of four or more files

Week 6: Autobots, Roll Out

this week we had Snow Day. Not a lot of things were done because school was canceled. I spent the week working on on UDR0 and trying to figure out what is going on. I am really struggling through using DD and tring to know what to do with bash and how to use it better.

Week 7, Detective work

Almost the same as week but working on Udr1. I understand how to use DD now. it is kinda simple. You have to specifiy location, bit size and length of file, file input name and out and bam you have what you need. This is used for extracting files from a file. Wow, talk about confusing. I guess you can use it maybe to hide files in files too…Hmmm this could be really handy later on. This class has been really kicking my butt.

Week 8 - Back on track

one of the issues I was having was trying to use text commands on binary data. Ie trying to CAT and Tac Binary file….So this lead us to learn this in class. All text data is a binary data, but not all binary data is text data every square is a rectangle but not all rectagles are squares.

Week 9 - Offroad

Okay I think the projects are starting to catch up with me. Using bgrep and hexeditor is starting to get me. I am starting to fall behind in the class and I am stuck on UDR1. I really should have been done with it but I couldnt figure out how to use the dang gizmo file. I keep getting an error I think I must have the wrong values because my reversers program works great but everything else….eh falling apart. I am not sure how to catch, I better start talking to Matt more.

Week 10 - break

I finally finished UDR1. It is breakweek. I am actually applying for a job at ID-DR a Data recovery firm in Elmira. There I found out they use a lot of tools that are like hex edit and DD. They use it to do data recovery. They have more commercial versions that are more powerful and able to find files more easily. It is kinda intresting. It practically feels like a puzzle box. We will see if I get the job because it has been a really long and have to go through several layers of security before I get in.

Week 11 - Getting into Grandmas Goodies

whoot this week we are learning about SSH TUNNELING. This is something that we do a lot or should do a lot. SSH tunneling is kinda neat in the fact it is kinda like remote access to allow you to maybe use a terminal to access things across a network and provides a layer of security in the fact that ssh is encrypted.

http://lab46.corning-cc.edu/opus/spring2015/user/start http://localhost:8080/opus/spring2015/user/start

ssh user@lab46.corning-cc.edu

ssh -g -l 8080:www:80 user@lab46.corning.edu Tunneling is used for acsessing maybe a server that is run on your computer (maybe an apache server that is only availble on your local machine) you can tap into through ssh and acsesss on any computer that has SSH

sidenote Aliases. setting PS -u as PS

alias shows current alias

Process Management. aka programs in action Every process has Process ID: PID (number of the process) PS - Shows active activity CPU and MEM - Looks like task manager. It may be nice to look at this. TTY - what is the terminal your using to launch what program Run - Only one thing can run a time.

Week 11 - I am Falling

I am really getting behind been working on other classes and been so busy trying to get udr2 done as well as udr1. I am really get hung up on what How to run run dd and put in the right commands. Working on udr2 is really tedious and lot of calculating. It is just sooo long of a project I am not sure what I will do to make sure it gets done. Meanwhile I downloaded both Tails and Kali distros of unix. Kali is a penetration testing linux distro that has some fun tools in it from dissassmblers to file recovery to metasploit and port scanners. Kinda fun stuff but dont use it on a machine that isnt yours. That is for sure. Tails is a really neat distro in the fact that it spoofs the machine specs and ip and everything is loaded into ram not hardrive space. It is kinda like the opposite of data recovery.

Week 12 - Catch up

I finished udr 2, probably skipped a little bit a part of it but oh well I got it done. It was really long and tiresome but I finished it. And I am glad just to get it done. I have been thinking about downloading hyper V with windows set up Kali and and Tails and Windows all at the same time and set up a virtual network to do network penetration testing and maybe set up my server and mapping everything together. So I could have a hybrid system. I think it would be really fun and could be a neat experience to put on my tool box. I want to kinda set up my own lab46ish system obvously it would be different. And I was thinking about making it only virtual.

Week 13 - No Go

Class Was canceled but still working on linux projects. Interested in making my own lab46 of sorts. I want to set up my own server with ssh.

Week 14 - Finals time

wemux- tool used to view a screen Cut - used to cut text on screen- remove sections of lines on each file. example of head and tail

cat session-201301041418.raw | bgrep '97 ff ff 00 80' | head -16 | tail -1

lab46:/tmp$ PATTERN="`echo $pattern | sed 's/^ //'`"                            │·············
lab46:/tmp$ cat session-201301041418.raw | bgrep "$PATTERN"     

Week 15 - The bitter sweet end

I have been really busy with other classes to be honest because finals is coming up and this class is kicking my butt. I really wish I was more profficient in linux and C++, I have been still messing around with the Kali Project. And Now I am working at ID-DR which is really awesome! I have been doing a lot of things like wiping hardrives though. Not really anything data recovery related though we use a tool called DDI which has capabilities of Imaging and reading hex of the hardrive and files. I mostly been using the tool to wipe out drives unfortunately.

Week 16 - Last Day

Today I have been cranking out work for linux. It is one of the last days. I have finished everything but the EOCE0 project. I did a majority of that project but I am not sure how much I will get done with the time alotted thought I did everything else. It is bitter sweet. It is one of my last proggramming classes I will take here at corning communitiy college. I really liked the class and I am gald I took it. On to bigger and better things like Computer Science at Liberty University.

opus/spring2015/sarnol15/journal.txt · Last modified: 2015/05/12 15:03 by sarnol15