Teaching Cyber Security (Part 8)

in #linux7 years ago (edited)

This is the 8th post of a series for teaching cyber-security in a coding-club. Read [part 7]

Seeing processes

View all processes in a machine

You should have done the following:

 sudo apt install htop

which means

  • sudo: super user do
  • apt: use the package installer apt to get new software
  • install: install
  • htop: a software called htop

to see if the installation worked all you have to do is type htop on the shell (remember you can exit by typing the letter q).

This will display a live list of all the programs that are running on this linux machine. Windows machines also have a similar shell called cmd or command line. To see the running programs under Windows you can type tasklist.

Autocomplete shortcuts

Complete your command arguments faster

As commands get longer, it's a little boring to type everything. The tab autocompletion keyboard shortcut speeds up adding command arguments.

info Using the tab autocompletion shortcut:

Whenever you need to access directories or need to type file names, hit the keyboard's tab key for the terminal to autocomplete your request:

autocompletion.gif

NOTE: Files and directories must exist in order for this shortcut to work.

try the following on the shell, from your home directory:

  • cd D then hit tab
  • D hit tab again
  • then tab again

Is there anything in that directory?

come back up two levels with:

  • cd ../..

Do pwd to make sure you are back to your home directory. If not, navigate back to it.

History shortcut

Tired of typing commands that were previously input?

Well, it turns out that there are 2 very useful keyboard shortcuts for exploring the command history.

The command history is a short memory storage of the inputs that were entered into the prompt.

info Press the up/down arrow keys to get the last commands you typed:

shortcut-cmd-history.gif

To continue this course, Read [Part 9]

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63117.29
ETH 2601.03
USDT 1.00
SBD 2.76