Linux tips

Tips for Ubuntu Linux. May work on other distros.

Basic shell commands (run from an xterm terminal)

man commandX for the help manual of a command named commandX
ls for the list of files in the folder
pwd location of the folder you’re in
find to look for a given file name
sudo to run a command as an adminitrator
sudo apt-get app1 to install an application called app1
sudo dpkg -i package.deb to install a deb package
df to see disk usage
ufw to manage a netfilter firewall

exFAT support

In order to be able to read from SDXC cards:

$ sudo apt-get install exfat-fuse exfat-utils

VPN
[tested with ubuntu 9.10]

install vpnc

$ sudo apt-get install vpnc

create a configuration file in /etc/vpnc/myconfig.conf, where myconfig may be any name you want. The file should look like this

IPSec gateway gateway.to.use
IPSec ID groupname
IPSec secret passwordforgroup
Xauth username myusername
Xauth password mypassword

Run vpnc

$ sudo vpnc myconfig

Stop vpnc

$ sudo vpnc-disconnect

Search for words in man pages

As in vi, press / to search for a keyword, then type the search pattern and Enter to search. Then n to search forward and N to search backwards.

Change display configuration from the command line

Find out what your displays are called by typing:

$ xrandr

In my case the laptop display is called LVDS and the external screen is called VGA-0

To turn off the laptop display and turn on the external screen, I simply write:

$ xrandr --output LVDS --off --output VGA-0 --auto

Leave a Reply

Your email address will not be published. Required fields are marked *