Class notes 5 16 - acavataio/ITC-136 GitHub Wiki

man pts- pts are pseudoterminals - run by Xterm, creating x emulated environment. lastb - bad login attempt

lastlog|less - users and when they last logged in


creating cheatsheet that is simple to get started.
opening in GEDIT, taking notes there.
gedit is good but needs GUI

VI/VIM Cheatsheet:
Line:
colon(particular line number) as in :34
$ to the end of the line
0 to the beginning of the line
dd delete line
u is undo

file:
gg top of the file
:$ bottom of the file
:wq save and close (write and quit)

multi-file
:split will compare 2 files
ctrl W W - switches between files
:hide gets rid of pane - will be prompted to save changes when you exit.

VIM makes a copy to edit, a .swp file, and does not reconcile the two until saved like the fork on Git.
in command mode if cant see insert at the bottom

search:
/whatever-your-searching-for to find what you are looking for in the file (hit n to next match)

Modes:
press "i" to go into insert mode
press "esc" to get to command mode

writing and exiting:
:wq to write and quit (! forces)
:w will write without quitting (! forces)
:q quits without writing (! forces)