Chapter 2 Getting Started Dr. Marjan Trutschl - - PowerPoint PPT Presentation

chapter 2 getting started
SMART_READER_LITE
LIVE PREVIEW

Chapter 2 Getting Started Dr. Marjan Trutschl - - PowerPoint PPT Presentation

Chapter 2 Getting Started Dr. Marjan Trutschl marjan.trutschl@lsus.edu Louisiana State University, Shreveport, LA 71115 Introducing Shells Conventions and Logging In Working from the Command Line su/sudo: Curbing Your Power (root


slide-1
SLIDE 1

Chapter 2 Getting Started

  • Dr. Marjan Trutschl

marjan.trutschl@lsus.edu Louisiana State University, Shreveport, LA 71115

slide-2
SLIDE 2

Introducing Shells

¤ Conventions and Logging In ¤ Working from the Command Line ¤ su/sudo: Curbing Your Power (root Privileges) ¤ man/info/--help: Displaying Information and Manuals ¤ Logins and Passwords

slide-3
SLIDE 3

Conventions and Logging In

¤ Conventions

¤ The textbook uses certain conventions, but we’ll avoid those with real examples for clarity

¤ Logging In

¤ Use PuTTy, Mac OS X Terminal, or your own flavor of Linux ¤ Try logging in to your Sun account username@sun.cs.lsus.edu ¤ If your machine has the same username, then it may be

  • mitted

¤ By default, the Raspberry Pi is pi@raspberry and the password is raspberry

slide-4
SLIDE 4

Logging In

slide-5
SLIDE 5

Working from the Command Line

¤ Some Commands to Get You Started

¤ The command line is very specific about syntax, always double check your spelling, spaces and capitalization ¤ The below commands tell you which shell you are running and where your shell is located

slide-6
SLIDE 6

Working from the Command Line

¤ Some More Commands to Get You Started

¤ Pressing ‘control z’ will suspend a program, or use –TERM (or even –KILL if things are getting really ugly) ¤ Use the arrows to repeat commands, or edit the last thing you tried to do ¤ ‘nano’ is a text editor that works via the command line, use it by specifying the file to use or create after ‘nano’ ¤ ‘cat’ simply sends the text output to the command line ¤ ‘tac’ is cat, but backwards…seriously ¤ ‘echo’ just repeats things and ‘rev’ reverses them

slide-7
SLIDE 7

Working from the Command Line

slide-8
SLIDE 8

Curbing Your Power

¤ Super User Commands

¤ root is the user level with complete access to the system ¤ Using the keyword ‘sudo’ will run a single command as root ¤ Logging in as ‘su’ enables the root user login ¤ You can really mess things up here; use only when needed ¤ The below commands give access to Wi-Fi configurations on the Raspberry Pi:

slide-9
SLIDE 9

Displaying Information and Manuals

¤ Your System: It’s Here To Help

¤ Find all kinds of information, directly from the system, unless you think the Internet is more reliable and full of facts ¤ ‘man’ shows basic information for the operation of a utility ¤ ‘info’ displays an interactive guide ¤ ‘--help’ provides a short list of common commands ¤ Since ‘man’ and ‘info’ are utilities, they take a search term as an argument; ‘--help’ is an argument to most utilities.

Before you get frustrated with a utility, read the man page. It actually helps sometimes.

slide-10
SLIDE 10

Logins and Passwords

¤ Logins

¤ Using the same username between different systems can simplify your login ¤ Also try ‘adduser’ and ‘userdel’ for user management

¤ Passwords

¤ Don’t use the same password, that simplifies cracking your system ¤ Use the ‘passwd’ command to change passwords

slide-11
SLIDE 11

Logins and Passwords

  • The Raspberry Pi is perfect

for this, since you have full admin rights on your machine and it’s cheap if you break it.

  • Notice the structure of the

syntax in these commands:

  • -’sudo’ is a modifier that

specifies access

  • -’userdel’ is a utility that

acts like a command

  • -’-r’ is an option, which is

interpreted by the utility

  • -’mtrutsch’ is an

argument, specified for the utility to act upon

slide-12
SLIDE 12

Exercise

¤ 1. Using the Raspberry Pi, create a new user. ¤ 2. Give the new user root privileges. ¤ 3. Change the user’s password using the pwgen utility. ¤ 4. Delete the user.

slide-13
SLIDE 13

Work Cited

¤ Sobell, Mark G. "Getting Started." A Practical Guide to Linux Commands, Editors, and Shell Programming. Upper Saddle River, NJ: Prentice Hall/Pearson, 2013. N. pag. Print.