Show Menu

Linux Cheat Sheet by

linux     ubuntu

Config­uration

sudo apt-get update
sudo apt-get install git
sudo apt install net-tools
sudo apt-get install apache2
sudo apt install vim

Setup xRDP

sudo apt-get install xfce4
sudo apt-get install xrdp
sudo systemctl enable xrdp
echo xfce4-­session >~/.xs­ession
sudo service xrdp restart
sudo passwd rdpuser

Services

service <name of servic­e> start/­sto­p/r­est­art­/status
self-e­xpl­anatory
chkconfig <se­rvi­ce> on
auto-start on redhat
chkconfig --list <se­rvi­ce>
remove auto-start on redhat
update­-rc.d <se­rvi­ce> defaults
auto-start on debian
update­-rc.d -f <se­rvi­ce> remove
remove auto-start on debian
netstat -antl
port inform­ation
 

History Operations

~/.bas­h_h­istory
contains history even after reboot
!v
run last command that starts with v
!$
last argument
!?etc
last command contains etc
history
show command history
cd .
change to home dir
!30
run command at line number 30 from history
ctrl-r
search commands, esc or enter to edit or run
HISTCONTROL=erasedups
erase duplicate commands from history
history -c + history -w
clear history
history -r
whenever you last wrote

Shutdown

shutdown
shutdown
reboot
reboot
poweroff
same as shutdown
halt
same as shutdown
init 0
same as shutdown
init 6
same as shutdown
shutdown -r +n "­war­nin­g"
reboot in n minutes, display warning
shutdown -r now
reboot now
shutdown -c
cancel a pending shutdown
shutdown -h
shutdown and then halt
shutdown hh:mm
shutdown at specified time

Download the Linux Cheat Sheet

1 Page
//media.cheatography.com/storage/thumb/shribee_linux.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Linux Command Line Cheat Sheet
          Ubuntu Compose Key Combinations Cheat Sheet
          Ubuntu Unity 16.04 Keyboard Shortcuts