tldr
tool using sudo apt install tldr
. You can then get usage examples for every console command, e.g. tldr ssh
to get examples for the ssh
command. (If there are no entries, run tldr -u
and try again)Experiment and do something useful with the following commands. You might need to use tldr
or Google the command.
man
(Get a more colorful output for man pages]top
cat
less
dpkg -l
apt-cache search <text>
apt update
apt dist-upgrade
apt install <package-name>
sudo <command>
sudo su
ssh
scp
df -h .
du -h .
ss --listening --tcp
or (old) netstat --listen --tcp
ln -s
touch
telnet
curl
ps
kill
kill -9
pkill -f <partial-name>
env
dig
grep
(use with |
)zgrep <needle> log/*.log*
Understand what you can do with the following configuration files:
~/.bashrc
~/.ssh/config
~/.gitconfig
Note that changes to your ~/.bashrc
don't affect already opened shells.
To edit files from within a terminal, you'll need a CLI editor.
:q
to exit:wq
to save (write) and exit:q!
to exit without writinggit commit
:# Example with vim
# open the configuration file
vim ~/.bashrc
# navigate to the end of the file,
# press "i" to switch to insert mode
# then type out the line you want to add
export EDITOR=vim
# persist your changes
:wq
Note
While you could set $EDITOR locally to a graphical to a editor like
gedit
, this is not possible for remote shells to our servers.
Getting accustomed to a CLI editor will pay off in the long term.
Understand what the following shortcuts do in a terminal:
Tab
CTRL+R
CTRL+Z
/ jobs
/ fg
/ bg
Show archive.org snapshot
Understand access rights and ownership of files:
ruby
command directly? Learn about the "shebang".