Contenidos
System Architecture
->Determine and configure hardware settings
->->Key Knowledge Areas:
->->->Enable and disable integrated peripherals
1 |
Get-WmiObject Win32_USBControllerDevice |%{[wmi]($_.Dependent)} | Sort-Object Manufacturer,Description,DeviceID | ft -GroupBy Manufacturer Description,Service,DeviceID |
1 |
Get-WmiObject -query "select * from Win32_PnPEntity where caption like '%cam%'" |
->->->Configure systems with or without external peripherals such as keyboards
1 |
Get-WmiObject -query "select * from Win32_PnPEntity" |
->->->Differentiate between the various types of mass storage devices
1 |
Get-WmiObject -Class win32_logicalDisk |
->->->Know the differences between coldplug and hotplug devices
1 |
Get-WmiObject -query "select * from Win32_PnPEntity" |
->->->Determine hardware resources for devices
1 |
Get-WmiObject -query "select * from Win32_PnPEntity" |
->->->Tools and utilities to list various hardware information (e.g. lsusb, lspci, etc.)
->->->Tools and utilities to manipulate USB devices
->->->Conceptual understanding of sysfs, udev, dbus
->->The following is a partial list of the used files, terms and utilities:
->->->/sys/
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 |
->->->/proc/
1 |
Get-Process |
1 |
Get-WmiObject -Class win32_process |
->->->/dev/
1 |
Get-WmiObject -Class win32_cdromdrive |
->->->modprobe
->->->lsmod
->->->lspci
1 |
Get-WmiObject -Class Win32_NetworkConnection |
->->->lsusb
1 |
Get-WmiObject Win32_USBControllerDevice |%{[wmi]($_.Dependent)} | Sort-Object Manufacturer,Description,DeviceID | ft -GroupBy Manufacturer Description,Service,DeviceID |
->Boot the system
->->Key Knowledge Areas:
->->->Provide common commands to the boot loader and options to the kernel at boot time
->->->Demonstrate knowledge of the boot sequence from BIOS to boot completion
->->->Understanding of SysVinit and systemd
->->->Awareness of Upstart
->->->Check boot events in the log files
->->Terms and Utilities:
->->->dmesg
->->->BIOS
1 |
Get-WmiObject -Class win32_bios |
->->->bootloader
1 |
(gwmi -name root\wmi -list bcdstore) |
->->->kernel
1 |
Get-Service http | fl * |
1 |
Get-Service * | Select-Object name, ServiceType |
->->->initramfs
->->->init
1 |
Get-Process Idle | select * |
->->->SysVinit
1 |
Get-Process -Id 4 | select * |
->->->systemd
->Change runlevels / boot targets and shutdown or reboot system
->->Key Knowledge Areas:
->->->Set the default runlevel or boot target
->->->Change between runlevels / boot targets including single user mode
->->->Shutdown and reboot from the command line
->->->Alert users before switching runlevels / boot targets or other major system events
->->->Properly terminate processes
->->Terms and Utilities:
->->->/etc/inittab
->->->shutdown
1 |
Stop-Computer |
->->->init
->->->/etc/init.d/
->->->telinit
->->->systemd
1 |
Get-Service |
->->->systemctl
1 |
Get-Service |
->->->/etc/systemd/
1 |
Get-Service |
->->->/usr/lib/systemd/
1 |
Get-Service |
->->->wall
Linux Installation and Package Management
->Design hard disk layout
->->Key Knowledge Areas:
->->->Allocate filesystems and swap space to separate partitions or disks
1 |
Get-WmiObject -Class win32_logicalDisk |
->->->Tailor the design to the intended use of the system
->->->Ensure the /boot partition conforms to the hardware architecture requirements for booting
->->->Knowledge of basic features of LVM
->->Terms and Utilities:
->->->/ (root) filesystem
1 |
Get-WmiObject -Class win32_logicalDisk |
->->->/var filesystem
->->->/home filesystem
->->->/boot filesystem
->->->swap space
1 |
Get-WMIObject -class win32_physicalmemory | Format-Table devicelocator, capacity -a |
->->->mount points
->->->partitions
1 |
Get-WmiObject -Class win32_logicalDisk |
->Install a boot manager
->->Key Knowledge Areas:
->->->Providing alternative boot locations and backup boot options
->->->Install and configure a boot loader such as GRUB Legacy
->->->Perform basic configuration changes for GRUB 2
->->->Interact with the boot loader
->->The following is a partial list of the used files, terms and utilities:
->->->menu.lst, grub.cfg and grub.conf
->->->grub-install
->->->grub-mkconfig
->->->MBR
->Manage shared libraries
->->Key Knowledge Areas:
->->->Identify shared libraries
1 |
Get-Process -Module |
->->->Identify the typical locations of system libraries
->->->Load shared libraries
->->Terms and Utilities:
->->->ldd
->->->ldconfig
->->->/etc/ld.so.conf
->->->LD_LIBRARY_PATH
->Use Debian package management
->->Key Knowledge Areas:
->->->Install, upgrade and uninstall Debian binary packages
1 |
Install-Package |
1 |
Uninstall-Package |
->->->Find packages containing specific files or libraries which may or may not be installed
1 |
Find-Package |
->->->Obtain package information like version, content, dependencies, package integrity and installation status (whether or not the package is installed)
1 |
Get-Package |
->->Terms and Utilities:
->->->/etc/apt/sources.list
->->->dpkg
1 |
Install-Package |
->->->dpkg-reconfigure
->->->apt-get
1 |
Get-Package |
->->->apt-cache
->->->aptitude
1 |
Install-Package |
->Use RPM and YUM package management
->->Key Knowledge Areas:
->->->Install, re-install, upgrade and remove packages using RPM and YUM
->->->Obtain information on RPM packages such as version, status, dependencies, integrity and signatures
->->->Determine what files a package provides, as well as find which package a specific file comes from
->->Terms and Utilities:
->->->rpm
1 |
Install-Package |
->->->rpm2cpio
->->->/etc/yum.conf
->->->/etc/yum.repos.d/
->->->yum
1 |
Install-Package |
->->->yumdownloader
GNU and Unix Commands
->Work on the command line
->->Key Knowledge Areas:
->->->Use single shell commands and one line command sequences to perform basic tasks on the command line
1 |
powershell |
1 |
powershell Start-Process cmd -Verb runAs |
->->->Use and modify the shell environment including defining, referencing and exporting environment variables
1 |
Get-ChildItem Env: |
->->->Use and edit command history
1 |
Get-History |
->->->Invoke commands inside and outside the defined path
->->Terms and Utilities:
->->->bash
1 |
powershell |
1 |
powershell Start-Process cmd -Verb runAs |
->->->echo
1 |
Write-Host |
->->->env
1 |
Get-ChildItem Env: |
->->->export
1 |
Get-History | Out-File |
->->->pwd
1 |
Get-Location |
->->->set
1 |
Set-Location |
->->->unset
->->->man
1 |
Get-Help |
->->->uname
1 |
Get-CimInstance Win32_OperatingSystem | Select-Object Caption, InstallDate, ServicePackMajorVersion, OSArchitecture, BootDevice, BuildNumber, CSName | FL |
1 |
Get-CimInstance Win32_OperatingSystem | FL * |
->->->history
1 |
Get-History |
->->->.bash_history
1 |
Get-History |
->Process text streams using filters
->->Key Knowledge Areas:
->->->Send text files and output streams through text utility filters to modify the output using standard UNIX commands found in the GNU textutils package
->->Terms and Utilities:
->->->cat
1 |
Get-Content fichero.txt |
->->->cut
1 |
("hola;adios").Split(";")[0] |
->->->expand
1 |
" hola" -replace (" ","") |
1 |
(" hola").Trim() |
->->->fmt
->->->head
1 |
New-Item |
->->->join
1 |
foreach ($partes1 in Get-Content fichero1.txt){foreach ($partes2 in Get-Content fichero2.txt){$partes1,$partes2 | Out-File ficherocompuesto.txt}} |
->->->less
1 |
Out-Host -Paging |
->->->nl
->->->od
1 |
[Convert]::ToString(19,16) |
1 |
[Convert]::ToString(19,8) |
->->->paste
->->->pr
1 |
"hola" | Out-Printer |
->->->sed
1 |
"hola" -replace "o","O" |
->->->sort
1 |
Get-ChildItem | Sort-Object |
1 |
Get-ChildItem | Sort-Object -Descending |
->->->split
1 |
("hola;adios").Split(";") |
->->->tail
1 |
Get-Content -Tail |
1 |
Get-Content -ReadCount 10 |
->->->tr
1 |
"hola" -replace "o","O" |
->->->unexpand
->->->uniq
1 |
Get-Process | Select-Object Name -Unique |
->->->wc
1 |
Get-Process | Group-Object | Select-Object count |
->Perform basic file management
->->Key Knowledge Areas:
->->->Copy, move and remove files and directories individually
1 |
http://www.jesusninoc.com/2011/11/08/cmdlets-para-realizar-operaciones-con-archivos-y-directorios/ |
1 |
Copy-Item |
1 |
Move-Item |
1 |
Remove-Item |
->->->Copy multiple files and directories recursively
1 |
Copy-Item -Recurse |
->->->Remove files and directories recursively
1 |
Remove-Item -Recurse |
->->->Use simple and advanced wildcard specifications in commands
1 |
Copy-Item * |
->->->Using find to locate and act on files based on type, size, or time
1 |
Get-ChildItem -File |
1 |
Get-ChildItem | Where-Object Length -GT 1 |
1 |
Get-ChildItem | Where-Object LastWriteTime -GT (get-date).AddDays(-1) |
->->->Usage of tar, cpio and dd
->->Terms and Utilities:
->->->cp
1 |
Copy-Item |
->->->find
1 |
Get-ChildItem -File |
->->->mkdir
1 |
New-Item -ItemType Directory |
->->->mv
1 |
Move-Item |
->->->ls
1 |
Get-ChildItem |
->->->rm
1 |
Remove-Item |
->->->rmdir
1 |
Remove-Item |
->->->touch
1 |
New-Item -ItemType File -Value "hi" |
->->->tar
1 |
Compress-Archive |
->->->cpio
1 |
Compress-Archive |
->->->dd
1 |
Copy-Item |
->->->file
1 |
Get-ChildItem .\@TileEmpty1x1Image.png | select Extension |
->->->gzip
1 |
Compress-Archive |
->->->gunzip
1 |
Compress-Archive |
->->->bzip2
1 |
Compress-Archive |
->->->xz
1 |
Compress-Archive |
->->->file globbing
->Use streams, pipes and redirects
->->Key Knowledge Areas:
->->->Redirecting standard input, standard output and standard error
1 |
Get-Process | Sort-Object |
->->->Pipe the output of one command to the input of another command
1 |
Get-Process | Sort-Object |
->->->Use the output of one command as arguments to another command
1 |
Get-Process | Sort-Object |
->->->Send output to both stdout and a file
1 |
Get-Process | Tee-Object | Out-File |
->->Terms and Utilities:
->->->tee
1 |
Get-Process notepad | Tee-Object -variable proc | Select-Object processname,handles |
->->->xargs
1 |
Invoke-Command -ScriptBlock {Get-Process} |
->Create, monitor and kill processes
->->Key Knowledge Areas:
->->->Run jobs in the foreground and background
1 |
Debug-Job |
1 |
Get-Job |
1 |
Receive-Job |
1 |
Remove-Job |
1 |
Resume-Job |
1 |
Start-Job |
1 |
Stop-Job |
1 |
Suspend-Job |
1 |
Wait-Job |
->->->Signal a program to continue running after logout
->->->Monitor active processes
1 |
Get-Process |
->->->Select and sort processes for display
1 |
Get-Process |
->->->Send signals to processes
1 |
Stop-Process |
->->Terms and Utilities:
->->->&
->->->bg
->->->fg
->->->jobs
1 |
Debug-Job |
1 |
Get-Job |
1 |
Receive-Job |
1 |
Remove-Job |
1 |
Resume-Job |
1 |
Start-Job |
1 |
Stop-Job |
1 |
Suspend-Job |
1 |
Wait-Job |
->->->kill
1 |
Stop-Process |
->->->nohup
1 |
Start-Job |
1 |
Resume-Job |
->->->ps
1 |
Get-Process |
->->->top
1 |
Get-Process |
->->->free
1 |
(Get-WmiObject -Class Win32_ComputerSystem).TotalPhysicalMemory/1gb |
->->->uptime
1 |
Get-CimInstance -ClassName win32_operatingsystem | select * |
1 |
Get-CimInstance -ClassName win32_operatingsystem | select csname, lastbootuptime |
->->->pgrep
1 |
(Get-Process -Name powershell_ise).Id |
->->->pkill
1 |
Stop-Process -Name notepad |
->->->killall
1 |
Stop-Process -Name notepad |
->->->screen
->Modify process execution priorities
->->Key Knowledge Areas:
->->->Know the default priority of a job that is created
1 |
Get-WmiObject Win32_process -filter 'name = "notepad.exe"' | foreach-object {$_.SetPriority(32)} |
->->->Run a program with higher or lower priority than the default
->->->Change the priority of a running process
->->Terms and Utilities:
->->->nice
1 |
Get-WmiObject Win32_process -filter 'name = "notepad.exe"' | foreach-object {$_.SetPriority(32)} |
->->->ps
1 |
Get-Process |
->->->renice
->->->top
1 |
Get-Process |
->Search text files using regular expressions
->->Key Knowledge Areas:
->->->Create simple regular expressions containing several notational elements
1 |
Get-Process | Select-String "Notepad" |
->->->Use regular expression tools to perform searches through a filesystem or file content
->->Terms and Utilities:
->->->grep
1 |
Get-Process | Select-String "Notepad" |
->->->egrep
->->->fgrep
->->->sed
->->->regex(7)
1 |
Get-Process | select-string -pattern idle, svchost -notmatch |
->Perform basic file editing operations using vi
->->Key Knowledge Areas:
->->->Navigate a document using vi
1 |
New-Item -Name nombre -Value "Hi" |
->->->Use basic vi modes
->->->Insert, edit, delete, copy and find text
->->Terms and Utilities:
->->->vi
1 |
New-Item -Name nombre -Value "Hi" |
->->->/, ?
->->->h,j,k,l
->->->i, o, a
->->->c, d, p, y, dd, yy
->->->ZZ, :w!, :q!, :e!
Devices, Linux Filesystems, Filesystem Hierarchy Standard
->Create partitions and filesystems
1 |
Get-WmiObject Win32_LogicalDisk |
->->Key Knowledge Areas:
->->->Manage MBR partition tables
->->->Use various mkfs commands to create various filesystems such as:
->->->-ext2/ext3/ext4
->->->-XFS
->->->-VFAT
->->->Awareness of ReiserFS and Btrfs
->->->Basic knowledge of gdisk and parted with GPT
->->Terms and Utilities:
->->->fdisk
->->->gdisk
->->->parted
->->->mkfs
->->->mkswap
->Maintain the integrity of filesystems
1 |
Get-WmiObject Win32_LogicalDisk |
->->Key Knowledge Areas:
->->->Verify the integrity of filesystems
1 |
Get-FileHash |
->->->Monitor free space and inodes
->->->Repair simple filesystem problems
->->Terms and Utilities:
1 |
Get-WmiObject win32_logicaldisk |
1 |
Get-PSDrive C | Select-Object Used,Free |
->->->du
->->->df
->->->fsck
->->->e2fsck
->->->mke2fs
->->->debugfs
->->->dumpe2fs
->->->tune2fs
->->->XFS tools (such as xfs_metadump and xfs_info)
->Control mounting and unmounting of filesystems
->->Key Knowledge Areas:
->->->Manually mount and unmount filesystems
1 |
New-PSDrive |
->->->Configure filesystem mounting on bootup
->->->Configure user mountable removable filesystems
->->Terms and Utilities:
1 |
New-PSDrive |
->->->/etc/fstab
->->->/media/
->->->mount
->->->umount
->Manage disk quotas
->->Key Knowledge Areas:
->->->Set up a disk quota for a filesystem
->->->Edit, check and generate user quota reports
->->Terms and Utilities:
->->->quota
->->->edquota
->->->repquota
->->->quotaon
->Manage file permissions and ownership
->->Key Knowledge Areas:
->->->Manage access permissions on regular and special files as well as directories
1 |
http://www.jesusninoc.com/2015/08/19/anadir-permiso-ntfs-a-una-carpeta/ |
1 |
Get-Acl |
1 |
Set-Acl |
->->->Use access modes such as suid, sgid and the sticky bit to maintain security
->->->Know how to change the file creation mask
->->->Use the group field to grant file access to group members
->->Terms and Utilities:
->->->chmod
1 |
Get-Acl |
1 |
Set-Acl |
->->->umask
->->->chown
->->->chgrp
->Create and change hard and symbolic links
->->Key Knowledge Areas:
->->->Create links
1 |
New-Item -ItemType SymbolicLink |
->->->Identify hard and/or soft links
->->->Copying versus linking files
->->->Use links to support system administration tasks
->->Terms and Utilities:
1 |
New-Item -ItemType SymbolicLink |
->->->ln
->->->ls
->Find system files and place files in the correct location
->->Key Knowledge Areas:
->->->Understand the correct locations of files under the FHS
->->->Find files and commands on a Linux system
->->->Know the location and purpose of important file and directories as defined in the FHS
->->Terms and Utilities:
->->->find
1 |
Get-ChildItem |
1 |
Select-String |
->->->locate
1 |
Get-ChildItem |
1 |
Select-String |
->->->updatedb
->->->whereis
1 |
Get-ChildItem |
1 |
Select-String |
->->->which
1 |
Get-ChildItem |
->->->type
1 |
Get-ChildItem | Get-Member |
->->->/etc/updatedb.conf