ALT OS
ALT OS
Module 1 - UNIX
Operating System A special computer program that controls the computer hardware. Serves as a liaison between the consumers and the resources.
Resource Allocator: the OS manages computer resources such as CPU time, memory, file storage, I/O devices, etc.
Control Program: it controls the execution of programs and I/O devices.
UNIX Services
Program Execution: loads the user program in memory and runs it. I/O Operations: responsible for reading & writing data from I/O devices. File System Handling: handles file organization, creation, and deletion. Error Detection: address errors within the computer system.
UNIX Varieties & Benefits
Based on an open standard Supported on wide variety of computers Multi-tasking; multi-user Hierarchical File System TCP/IP tightly integrated True 64-bit architecture
File System Tree-structured group of directories.
Directory File locations and subdirectories
Subdirectory Directory below another directory
Files Contained in directories & subdirectories Common Subdirectories
/usr directory - exe.files, system admin utils, library routines
/optional directory - apps & third-party apps
/devices directory - pointer files to device names
/etc directory - sysadmin files
/export/home directory - user home directories
/kernel directory - basic OS files
/var directory - print spooling & mail system error messages
OS Components
Kernel: manages computer operation Shell: renders the computer user interface File System: organizes computer info
Shells
Bourne shell ($) Original shell program Provides a UNIX system command interpreter
Korn shell ($) An enhanced Bourne shell Added features such as aliasing and history Widely-used & industry standard
C shell (%) California Shell Based on the C language Allows recalling and editing of commands and aliasing
POSIX shell Similar to Korn shell Command programming language and interpreter Supports command history, line editing, file name completion, aliasing, and job control
Ubuntu Commands
$ whatis “command” Tells you what the command does.
$ rm -d "directory"
- delete directory
$ ls
- view directories
$ man
- see list of parameters of command
$ mkdir "directory"
- create a directory
$ date Display the date and time.
$ passwd Assign a login password
$ sudo apt install “package” Install a package.
$ sudo apt install sysvbanner Install system banner.
$ banner ‘text here’ Display text in a banner.
$ who Determine currently logged-in user.
$ finger Same as $ who.
$ whoami Determines who is logged-in at a specific terminal.
$ echo Writes arguments to terminal. MUST USE “ ”.
$ clear Clears the terminal. $ write Sends message to user if logged-in
$ talk Same as $ write.
$ mesg [y/n] Allows or denies writes to your terminal.
$ sudo adduser “username” Create new user.
$ man man Help on particular command
$ man -k keyword Searches the man pages for the keyword
$ man - s section name Displays a particular section of the man pages.
$ cd Change the working directory.
$ grep Search a file for a pattern.
$ history Shows all commands entered in the past.
Ubuntu Shortcuts CTRL + C Terminate the currently-running program.
CTRL + Q Enable screen scroll
CTRL + D Log out / exit
Chapter 2: UNIX/LINUX & Logging In
Login ID Unique Limited to 8 lower case letters and numbers
Passwords No less than 6 and no more than 8 characters Case sensitive 3 characters different from login ID
Root / “Super User” System admin Set-up by default Privileged user mode with more access
Regular User Created by sysadmin Can run apps and customize working environment Can create or modify files
Changing Passwords $passwd Done at command line Enter current pass Enter new pass Re-enter new pass
Command-Line Syntax Case-sensitive Can type 2 commands on a single line separated by “;”.
=============================