Contenidos
Introduction
Windows PowerShell uses a «verb-noun» naming system
The Linux Community and a Career in Open Source
->Linux Evolution and Popular Operating Systems
->->Key Knowledge Areas:
->->->Desktop Applications
->->->Server Applications
->->->Development Languages
->->->Package Management Tools and repositories
->->Terms and Utilities:
->->->OpenOffice.org, LibreOffice, Thunderbird, Firefox, GIMP
->->->Apache HTTPD, NGINX, MySQL, NFS, Samba
->->->C, Java, Perl, shell, Python, Samba
->->->dpkg, apt-get, rpm, yum
->Understanding Open Source Software and Licensing
->->Key Knowledge Areas:
->->->Licensing
->->->Free Software Foundation (FSF), Open Source Initiative (OSI)
->->Terms and Utilities:
->->->GPL, BSD, Creative Commons
->->->Free Software, Open Source Software, FOSS, FLOSS
->->->Open Source business models
->ICT Skills and Working in Linux
->->Key Knowledge Areas:
->->->Desktop Skills
->->->Getting to the Command Line
->->->Industry uses of Linux, Cloud Computing and Virtualization
->->Terms and Utilities:
->->->Using a browser, privacy concerns, configuration options, searching the web and saving content
->->->Terminal and Console
->->->Password issues
->->->Privacy issues and tools
->->->Use of common open source applications in presentations and projects
Finding Your Way on a Linux System
->Command Line Basics
->->Key Knowledge Areas:
->->->Basic shell
->->->Command line syntax
1 |
Get-Verb |
1 |
Get-Command -Noun |
->->->Variables
->->->Globbing
1 |
* |
1 |
? |
->->->Quoting
1 |
" |
1 |
' |
->->Terms and Utilities:
->->->Bash
->->->echo
1 |
Write-Host |
->->->history
1 |
Get-History |
->->->PATH env variable
1 |
$Env:Path |
1 |
[Environment]::GetEnvironmentVariable("Path") |
->->->export
->->->type
1 |
Get-Content |
->Using the Command Line to Get Help
->->Key Knowledge Areas:
->->->Man
1 |
Get-Help |
->->->Info
->->Terms and Utilities:
->->->man
1 |
Get-Help |
->->->info
1 |
Get-Help |
->->->Man pages
1 |
Get-Help |
->->->/usr/share/doc/
1 |
Get-Help |
->->->locate
->Using Directories and Listing Files
->->Key Knowledge Areas:
->->->Files, directories
1 |
Get-ChildItem -File |
1 |
Get-ChildItem -Directory |
->->->Hidden files and directories
1 |
Get-ChildItem -Hidden |
->->->Home
1 |
$home |
->->->Absolute and relative paths
1 |
c:\ |
1 |
..\ |
->->Terms and Utilities:
->->->Common options for ls
1 |
Get-ChildItem |
->->->Recursive listings
1 |
Get-ChildItem -Recurse |
->->->cd
1 |
Set-Location |
->->->. and ..
1 |
. |
1 |
.. |
->->->home and ~
1 |
Set-Location ~ |
->Creating, Moving and Deleting Files
->->Key Knowledge Areas:
->->->Files and directories
1 |
Get-ChildItem -File |
1 |
Get-ChildItem -Directory |
->->->Case sensitivity
->->->Simple globbing and quoting
1 |
" |
1 |
' |
->->Terms and Utilities:
->->->mv, cp, rm, touch
1 |
Move-Item |
1 |
Copy-Item |
1 |
Remove-Item |
1 |
New-Item |
->->->mkdir, rmdir
1 |
New-Item |
1 |
Remove-Item |
The Power of the Command Line
->Archiving Files on the Command Line
->->Key Knowledge Areas:
->->->Files, directories
1 |
Get-ChildItem -File |
1 |
Get-ChildItem -Directory |
->->->Archives, compression
1 |
Get-ChildItem -File |
->->Terms and Utilities:
->->->tar
1 |
Compress-Archive |
1 |
Expand-Archive |
->->->Common tar options
->->->gzip, bzip2
1 |
Compress-Archive |
1 |
Expand-Archive |
->->->zip, unzip
1 |
Compress-Archive |
1 |
Expand-Archive |
->Searching and Extracting Data from Files
->->Key Knowledge Areas:
->->->Command line pipes
1 |
Get-Command | Select-Object CommandType, name |
->->->I/O re-direction
1 |
Get-Command > fichero.txt |
->->->Basic Regular Expressions ., [ ], *, ?
1 |
Get-ChildItem . |
1 |
Get-ChildItem | Where-Object {$_.Name -match "\d\.[^\d]"} |
1 |
Get-ChildItem *.iso |
1 |
Get-ChildItem *.is? |
->->Terms and Utilities:
->->->grep
1 |
Get-ChildItem | select-object name | Select-String 2015 |
->->->less
1 |
more |
->->->cat, head, tail
1 |
Get-Content |
1 |
Get-Content -ReadCount |
->->->sort
1 |
Get-ChildItem | Sort-Object |
->->->cut
1 |
Get-ChildItem | Select-Object Name |
->->->wc
1 |
(Get-ChildItem | Select-Object Name).count |
->Turning Commands into a Script
->->Key Knowledge Areas:
->->->Basic shell scripting
->->->Awareness of common text editors
->->Terms and Utilities:
->->->#! (shebang)
->->->/bin/bash
->->->Variables
->->->Arguments
->->->for loops
->->->echo
1 |
Write-Host "Hi" |
->->->Exit status
1 |
exit |
The Linux Operating System
->Choosing an Operating System
->->Key Knowledge Areas:
->->->Windows, Mac, Linux differences
->->->Distribution life cycle management
->->Terms and Utilities:
->->->GUI versus command line, desktop configuration
->->->Maintenance cycles, Beta and Stable
->Understanding Computer Hardware
->->Key Knowledge Areas:
->->->Hardware
1 |
#Serial Number, Vendor, information |
1 |
Get-WmiObject -Class Win32_ComputerSystem |
1 |
#Bios Information , including Version Number of BIOS |
1 |
Get-WmiObject -Class win32_bios |
1 |
#Battery Information |
1 |
Get-WmiObject -Class win32_battery |
1 |
#Serial Number, Capacity, Part Number of Installed Memory Stick |
1 |
Get-WmiObject -Class win32_Physicalmemory |
1 |
#Capacity, Serial Number of Drive and other info of the Hard-disk |
1 |
Get-WmiObject -Class win32_DiskDrive |
1 |
#Monitor Information including Resolutions |
1 |
Get-WmiObject -Class win32_DesktopMonitor |
1 |
#Information Related Cd Drive |
1 |
Get-WmiObject -Class win32_cdromdrive |
1 |
#Network Adaptor information contains, manufacturer, MAC ID etc |
1 |
Get-WmiObject -Class win32_networkadapter |
1 |
#Mouse related information |
1 |
Get-WmiObject -Class win32_pointingdevice |
1 |
#OS Name, OSArchitecture, Version Info |
1 |
Get-WmiObject -Class win32_operatingsystem |
1 |
#DeviceID, Free Space, Size of Partition |
1 |
Get-WmiObject -Class win32_logicalDisk |
1 |
#Mapped Network Drives |
1 |
Get-WmiObject -Class Win32_NetworkConnection |
1 |
#List of Installed Printers |
1 |
Get-WmiObject -Class win32_printer |
1 |
#List of Printer Drivers |
1 |
Get-WmiObject -Class win32_PrinterDriver |
1 |
#IP Adress, DHCP , DNS and other information of Network Drivers |
1 |
Get-WmiObject -Class Win32_NetworkAdapterConfiguration |
1 |
#Command that runs automatically when a user logs onto the computer system |
1 |
Get-WmiObject -Class win32_startupCommand |
1 |
#All Running Processes |
1 |
Get-WmiObject -Class win32_process |
1 |
#List of All Services |
1 |
Get-WmiObject -Class win32_Service |
1 |
#List of Installed Software |
1 |
Get-WmiObject -Class win32_Product |
->->Terms and Utilities:
->->->Motherboards, processors, power supplies, optical drives, peripherals
1 |
Get-WmiObject -Class Win32_Processor | Select -Property Name, Number* |
1 |
Get-WmiObject Win32_BIOS –computername $computer |
1 |
Get-WmiObject -query "select Name,Status from Win32_PnPEntity" |
->->->Hard drives and partitions, /dev/sd*
1 |
Get-WmiObject -Class win32_DiskDrive |
->->->Drivers
1 |
Get-Process -Module |
->Where Data is Stored
->->Key Knowledge Areas:
->->->Programs and configuration, packages and package databases
1 |
Get-WmiObject -Class Win32_Product |
1 |
Get-Package |
1 |
Install-Package filezilla |
->->->Processes, memory addresses, system messaging and logging
1 |
Get-Process |
1 |
@(Get-Process).where{$_.WorkingSet -gt 100MB} |
1 |
@(Get-Process).where{$_.WS -gt 100MB} |
->->Terms and Utilities:
->->->ps, top, free
1 |
Get-Process |
->->->syslog, dmesg
1 |
Get-EventLog -LogName System |
->->->/etc/, /var/log/
1 |
Get-EventLog -LogName System |
->->->/boot/, /proc/, /dev/, /sys/
->Your Computer on the Network
->->Key Knowledge Areas:
->->->Internet, network, routers
->->->Querying DNS client configuration
->->->Querying Network configuration
->->Terms and Utilities:
->->->route, ip route show
->->->ifconfig, ip addr show
->->->netstat, ip route show
->->->/etc/resolv.conf, /etc/hosts
->->->IPv4, IPv6
->->->ping
->->->host
Security and File Permissions
->Basic Security and Identifying User Types
->->Key Knowledge Areas:
->->->Root and Standard Users
1 |
Get-WmiObject -Class Win32_Account |
1 |
net user |
->->->System users
1 |
Get-WmiObject -Class Win32_Account |
1 |
net user |
->->Terms and Utilities:
->->->/etc/passwd, /etc/group
1 |
Get-WmiObject -Class Win32_Account |
1 |
net user |
->->->id, who, w
1 |
net user |
->->->sudo, su
1 |
Get-WmiObject -Class Win32_Account |
1 |
net user |
->Creating Users and Groups
->->Key Knowledge Areas:
->->->User and group commands
1 |
Get-WmiObject -Class Win32_Account |
1 |
net user |
1 |
net localgroup |
->->->User IDs
1 |
Get-WmiObject -Class Win32_Account |
1 |
net user |
1 |
net localgroup |
->->Terms and Utilities:
->->->/etc/passwd, /etc/shadow, /etc/group, /etc/skel/
1 |
Get-WmiObject -Class Win32_Account |
1 |
net user |
1 |
net localgroup |
->->->id, last
->->->useradd, groupadd
1 |
Get-WmiObject -Class Win32_Account |
1 |
net user |
1 |
net localgroup |
->->->passwd
1 |
net user |
->Managing File Permissions and Ownership
->->Key Knowledge Areas:
->->->File/directory permissions and owners
1 |
Get-Acl |
->->Terms and Utilities:
->->->ls -l, ls -a
1 |
Get-Acl |
->->->chmod, chown
1 |
Set-Acl |
->Special Directories and Files
->->Key Knowledge Areas:
->->->Using temporary files and directories
->->->Symbolic links
->->Terms and Utilities:
->->->/tmp/, /var/tmp/ and Sticky Bit
->->->ls -d
->->->ln -s