An introduction to Linux Part 4

Similar documents
STA 303 / 1002 Using SAS on CQUEST

Network Monitoring & Management. A few Linux basics

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

UNIT 9 Introduction to Linux and Ubuntu

Easy Windows Working with Disks, Folders, - and Files

FireFox. CIS 231 Windows 10 Install Lab # 3. 1) Use either Chrome of Firefox to access the VMware vsphere web Client.

Using the Zoo Workstations

commands exercises Linux System Administration and IP Services AfNOG 2015 Linux Commands # Notes

Linux Command Line Interface. December 27, 2017

More Raspian. An editor Configuration files Shell scripts Shell variables System admin

CTEC1863/2018F Bonus Lab Page 1 of 5

1 Ctrl + X Cut the selected item. 2 Ctrl + C (or Ctrl + Insert) Copy the selected item. 3 Ctrl + V (or Shift + Insert) Paste the selected item

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12)

Lab #2 Physics 91SI Spring 2013

1 Installation (briefly)

#Uncomment the second line to enable any form of FTP write command. #write_enable=yes

Review of Fundamentals

Lab 11-1 Lab User Profiles and Tracking

Working With Unix. Scott A. Handley* September 15, *Adapted from UNIX introduction material created by Dr. Julian Catchen

Using Ruby and irb in CSE 341 Winter 2015

In this exercise you will practice working with HDFS, the Hadoop. You will use the HDFS command line tool and the Hue File Browser

CIS 231 Windows 10 Install Lab # 3

CS CS Tutorial 2 2 Winter 2018

Windows 10 Creators Edition Tips & Tricks. These New Hidden Features Will Save You Time and Money

!!!!!!!!!!Please Read before upgrading!!!!!!!!

Introduction to Unix

Copyright 2004, Mighty Computer Services

Step-by-step guide for the libradtran virtual machine. A) Installation

GEO 425: SPRING 2012 LAB 9: Introduction to Postgresql and SQL

LAB #5 Intro to Linux and Python on ENGR

Installing MySQL on the Command Line

Git Setup Help using GitKraken (CSE 154)

How to use the Social care: a rewarding career for you tool

Command Line Interface The basics

Using IDLE for

Intermediate Programming, Spring Misha Kazhdan

LAB #7 Linux Tutorial

The kernel is the low-level software that manages hardware, multitasks programs, etc.

Lab Working with Linux Command Line

KeePass Password Safe: Password Manager

BE CAREFUL! The Summer Research Student s Guide to UNIX

1. Open VirtualBox and start your linux VM. Boot the machine and log in with the user account you created in Lab #1. Open the Terminal application.

Lab 2 Building on Linux

CITRIX NAVIGATION & ACCESSING myhr

Navigating in Windows 10

Lab 1 Introduction to UNIX and C

If the workshop is being performed on a laptop provided by Nordcad there is no need to install the workshop files.

Your . A setup guide. Last updated March 7, Kingsford Avenue, Glasgow G44 3EU

NSCC SUMMER LEARNING SESSIONS MICROSOFT OFFICE SESSION

Installing MediaWiki using VirtualBox

Introduction. File System. Note. Achtung!

213/513/613 Linux/Git Bootcamp. Cyrus, Eugene, Minji, Niko

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1

Mills HPC Tutorial Series. Linux Basics I

Office 365. Contents. Features, screen shots, and instructions are subject to change at any time Page 1

The Command Shell. Fundamentals of Computer Science

Adafruit's Raspberry Pi Lesson 6. Using SSH

Running MESA on Amazon EC2 Instances: A Guide

Microsoft OneDrive. How to login to OneDrive:

Switch between open apps Close the active item, or exit the active app

Hitchhiker s Guide to VLSI Design with Cadence & Synopsys

Chapter 1 -- Getting Started, Getting Help

Commands are in black

Linux Kung Fu. Ross Ventresca UBNetDef, Fall 2017

Installing VPN client by Jupiter Networks:

Short Read Sequencing Analysis Workshop

Instruction: Download and Install R and RStudio

Version June 2016

Author A.Kishore/Sachin WinSCP

CSE 391 Editing and Moving Files

Temple University Computer Science Programming Under the Linux Operating System January 2017

When talking about how to launch commands and other things that is to be typed into the terminal, the following syntax is used:

Working with Basic Linux. Daniel Balagué

How to set up an Amazon Work Profile for Windows 8

Software Development I

Linux Bootcamp Fall 2015

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

Section 2: Developer tools and you. Alex Mariakakis (staff-wide)

15-122: Principles of Imperative Computation

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Copyright 2018 MakeUseOf. All Rights Reserved.

Chapter-3. Introduction to Unix: Fundamental Commands

Installing VirtualBox and Ubuntu

Linux Command Line Primer. By: Scott Marshall

CUSTOMIZING & USING WINDOWS 10. by Hewie Poplock

Google Drive: Access and organize your files

Introduction to Unix

CIS 231 Windows 2012 R2 Server Install Lab #1

Introduction. SSH Secure Shell Client 1

Managing Files. In this chapter

Using RANCID. Contents. 1 Introduction Goals Notes Install rancid Add alias Configure rancid...

Mac OS X 10.6 Snow Leopard Installation and Setup Guide

WinSCP. Author A.Kishore/Sachin

Introduction to Linux Workshop 1

When you first log in, you will be placed in your home directory. To see what this directory is named, type:

Getting your department account

The Python Mini-Degree Development Environment Guide

Solar Campaign Google Guide. PART 1 Google Drive

Formatting: Cleaning Up Data

Parallels Desktop 4.0 Switch to Mac Edition. Migrate your PC Tutorial.

Transcription:

An introduction to Linux Part 4 Open a terminal window (Ctrl-Alt-T) and follow along with these step-by-step instruction to learn some more about how to navigate in the Linux Environment. Open the terminal window so that it is about the same size as this one, so both fit, side by side, and you can follow along interactively...

clear One of the difficulty (and beauties) of working in the terminal is that you can see all of the things you ve done in the past few minutes right there on the screen. Sometimes the screen gets messy, so you ll want to get used to using the clear command. It doesn t actually erase anything, but it pushes everything up, above the screen. You can scroll up and see it again if you like.

TMI Another way to make it easier to view things in Linux is looking around a directory to see what files and folders (directories) are there. Remember what a huge pain it was to look at all those files in /etc? No?...Well, let s go there and learn another trick for viewing large amounts of information. Enter the command cd /etc

ls less Enter ls to see the content of /etc. Too much information, huh? Well, let s pipe that information to the less command, so that we can see it one page at a time. Enter ls less with the character (the key above the [Enter] key, using [Shift]) and with spaces between each. Type q to quit and the arrow keys to move up and down. Neat, huh!

ls -C less And if you want to be even more organized, try entering this modification to see the output in columns (-C) a page at a time. In English, this would be look see, in columns, piped to see less information, a page at a time.

ls grep xxx What if you wanted to see only those files or folders in /etc that contained the characters app? Well, you can use the command/program/utility called grep to search for specific strings or characters. Enter ls grep app

ls -R grep yyyyyy How can we use this in working on CyberPatriot issues? Well, what if we wanted to find all of the files in the /etc directory that contained the name config (as in configuration)? Well, we d start with ls, to which we would add -R (the recursive option, to drill down through all the layers in /etc), and then grep for config This screen shot shows us just a few of the files found.

editing a file Let s put some of our new knowledge to work with a security file, one involving user passwords. We ll find out how to ensure that everyone uses a password that is strong and secure and is coded with the sha512 algorithm. Along the way, we ll learn how to use the nano program to edit an important security file. We ll start by going to the /etc directory, if you are not already there. cd /etc

locate Now let s look for a file that contains the word password because we remember that there is an important security file with that word in its name. We ll use the sudo command because maybe the file is only accessible to admin users. Well, that helps, but I need to know where it is located; that is, I need to know its path. Let s use the locate command with the word password Wow! Talk about TMI...

using locate & grep Let s show just a page at a time by piping to less Well, that is still TMI, so let s see if we can filter with just those files in /etc which contain the word password in their name Ah! Now we know where it is. Let s go there using cd

sudo nano and Ctrl w Let s look around and then, once we spot the file, open it as the superuser in a file editor called nano (named nano because it is small and easy to use) and then let s look for the part of the file that we want to check on and maybe modify. Type Ctrl w and enter the characters sha512 and click [Enter]

nano Alt w To keep looking for sha512 because it shows up multiple times in lines that start with #, meaning that the line is a comment and not read by the computer (just humans can read comments), let s let the nano editor fill the screen (click the box icon ) and click Alt w to keep hunting for the line that contains sha512 Ah! there it is If not there, we d want to modify the line to read

nano: Save and Quit Once the line reads correctly, we would click Ctrl o to output the file, click [Enter] to accept the file name, and then click Ctrl x to exit. What we have just done is examine a configuration file for password complexity (the more complex a password is, the harder it is to hack!) and, if the file is not the way it should be, edit it. Good work, hacker!

nano: quit without saving If you are working in the editor and realize that you have made changes you are not too sure about, you can exit the editor without saving any of your changes. Type Ctrl-x and you will see Type n and you will be back at your prompt, having exited nano without saving anything at all.