This was previously a consolidation of many guides on the web including some stuff from
ubuntuguide. Ubuntuguide is now a wiki, so for basic ubuntu tricks, head to
there. This is now a haven for intermediate to advanced linux tutorials, although they generally favor ubuntu. Info here is licensed under the
GNU GPL, the
GNU FDL, and
Attribution-ShareAlike 2.0 where applicable.
..:: DISCLAIMER & WARNING
- This information is provided without any implied or expressed promises or warranty (without even the implied warranty of merchantibility or fitness for a particular purpose)
- Some commands here may break your system
- Some commands here may violate your country's laws. For instance, your country may have laws that prohibit encryption usage (which is used by SSH/putty). It is your responsibility to be aware and abide by your country's laws.
- By using, referring to, or even acknowledging existence of this guide, you agree to hold yourself exclusively
responsible for your actions, and any damages which may arise in relation to using or even not using this guide
and any software mentioned here.
- In other words IF SOMETHING BAD HAPPENS BECAUSE YOU USE THIS, IT'S YOUR FAULT, NOT MINE.
..:: General Linux
..::
How to run these commands (*term)
You need to open a terminal to run these commands. These commands are set up that you can just copy and paste them into your terminal. If a command starts with sudo, it may need your (or your administrator's) password.
if text looks like this, it is the instructions you should paste it into your terminal.
To open a terminal in Ubuntu, left click Applications > Accessories > Terminal. This is gnome-terminal
..::
Mount an iso file
mount -o loop -t iso9660 file.iso /mnt/test
..::
Mount a fat(32) partition
sudo mount /dev/your_fat_partition /media/where_you_want_to_mount -t vfat -o iocharset=utf8,umask=0000
..::
General SSH usage (adminstration and file transfer)
SSH is a remote terminal. To connect to a computer running the ssh server type any one of these lines
ssh your_username@server_hostname
ssh your_username@server_ip
ssh server_hostname -l your_username
ssh server_ip -l your_username
For example, my username is djlosch, and i want to connect to a box that i know as foo.djlosch.com and also 127.0.0.2. I can use any of these commands to connect to it.
ssh djlosch@foo.djlosch.com
ssh djlosch@127.0.0.2
ssh foo.djlosch.com -l djlosch
ssh 127.0.0.2 -l djlosch
In addition to providing complete terminal functionality, you can also transfer files between the remote machine and your current machine. To do retrieve a file from the remote computer use:
scp -r username@192.168.0.1:/home/username/remotefile.txt .
To send a file to the remote machine use:
scp -r localfile.txt username@192.168.0.1:/home/username/
..::
Use ssh from a Windows computer [windows]
To use SSH terminal from a windows machine, you will need putty:
- right click this file and choose save as: http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe
- save it wherever you like to save your programs.
- type in the hostname or ip of the computer you want to connect to in the "Host Name (or IP address)" box
- click the SSH radio button in the "Protocol" selection.
- click "Open" at the bottom of the window
To use SSH file transfer from a windows machine, you will need winscp:
- download winscp from here: http://prdownloads.sourceforge.net/winscp/winscp376.exe?download
- save it wherever you like to save your programs.
- click "New" and then type in the hostname or ip of the computer you want to connect to in the "Host Name (or IP address)" box
- type your username in the "User name" box, and verify that the "Port number" is set to 22.
- click "Login" at the bottom of the window
..::
Basic text editing with nano
To start nano type
nano
If you want to edit a system file, you will need to add a sudo at the beginning. So, if you want to edit /etc/cron.hourly/some_script.sh, type
sudo nano /etc/cron.hourly/some_script.sh
Nano is also a different version of pico, so if your machine doesn't have nano, see if it has pico
pico --version
Nano uses a combination of the control key and letters to execute commands.
ctrl-X: exit
ctrl-K: cut
ctrl-U: paste (uncut)
ctrl-C: tell me te current position of the cursor in the document
ctrl-W: search
type your word and then press enter. to find the next occurence, use ctr-W and just hit enter again.
ctrl-O: save (writeout)
if you specified a filename when you opened nano, you can just hit ctrl-O and then enter and it will save your file
ctrl-Y: page up (works on solaris/unix when the page up button doesn't work)
ctrl-V: page down (works on solaris/unix when the page down button doesn't work)
If you notice, nano's crtl-U paste does not use the global clipboard so if you're in a windowed terminal, you'll need to either right click, right click and go to Paste, or middle click, depending on whether you're gnome-terminal, windows & putty, or another terminal.
..::
Create a command to control your PCM volume
1) type
sudo wget http://www.djlosch.com/source/volmute -O /usr/bin/volmute
2) example usage
volmute increase #increase PCM volume
volmute decrease #increase PCM volume
volmute mute #mute PCM volume
volmute unmute #unmute PCM volume
volmute toggle #toggle muting of PCM volume
3) use this in conjunction with your multimedia key listener daemon, or voice control daemon to easily control your PCM volume
..::
Use gaim to connect to Gmail IM
In gaim click Tools > Accounts > Add
Use these settings:
Protocol: Jabber
Screen Name: Your_gmail_screen_name
Server: gmail.com
Resource: Gaim
Password: Your_gmail_password
Use TLS if available: checked
Force old SSL: unchecked
Allow plaintext auth over encrypted streams: unchecked
Port: 5222
Connect Server: talk.google.com
Proxy Type: Use Global Proxy Settings (unless you specifically need to change this)
Alias, Remember Password, and Auto-Login are up to you.
..:: Ubuntu
..::
Add extra repositories [ubuntu breezy and edgy]
..::
Install a desktop session recorder that supports Beryl/Compiz, AIGLX, XGL (recordmydesktop)
..::
Enable voice command and control (cvoicecontrol)
1) type
wget http://www.kiecza.net/daniel/linux/cvoicecontrol_0.9alpha-1_i386.deb
sudo apt-get install libncurses
sudo dpkg -i cvoicecontrol_0.9alpha-1_i386.deb
2) configure your microphone by typing
TERM=vt100
microphone_config
3) add commands to your voice model by typing
model_editor
4) run the speech listener daemon using your voice model file by typing
cvoicecontrol your_voice_model_file
..::
Install a BitTorrent client (azureus)
1) Azureus has been added to the extended repositories so you can now get it in apt.
sudo apt-get install azureus
..::
Install and configure network file server (samba)
1)
Add extra repositories
2) type
sudo apt-get install samba
sudo nano /etc/samba/smb.conf
3) edit the open file as necessary. here is an example
[global]
workgroup = your_workgroup
encrypt passwords = yes
password level = 20
map to guest = bad user
socket options = SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY
security = user
server string = Samba on %h
wins support = no
[homes]
comment = Home Directories allowing R/W access to owner
valid users = %S
browseable = no
read only = No
create mask = 0640
directory mask = 0750
guest ok = no
[archive]
comment = Archive allowing Read Only access for all
path = /some/path/to/folder/for/sharing
public = yes
writeable = no
[free_serve]
comment = Archive allowing R/W access for all
path = /some/path/to/folder/for/sharing
read only = No
force user = the_username_you_want_to_own_the_file
force group = the_groupname_you_want_to_own_the_file
guest ok = Yes
..::
Enable encryption (SSL) for apache by creating a self signed certificate
1)
Add extra repositories
2) type
sudo apt-get install apache2
sudo cp /etc/apache2/sites-available/default /etc/apache2/default.default
sudo /usr/sbin/apache2-ssl-certificate -days 365
sudo apache2-ssl-certificate
sudo a2enmod ssl
cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
ln -s /etc/apache2/sites-available/ssl /etc/apache2/sites-enabled/ssl
3) now you need to determine where you want to put your files that will be served using ssl encryption. I put mine in /var/www-ssl/ and will use this as my example. type
sudo mkdir /var/www-ssl
4) now comes the trickier part. make these changes to your /etc/apache2/sites-available/default (How to edit using
nano). Note that if you paste, the < and > may translate to periods, so change them back to brackets.
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www
5) make these changes to your /etc/apache2/sites-available/ssl
NameVirtualHost *:443
<VirtualHost *:443>
DocumentRoot /var/www-ssl
6) add this to your /etc/apache2/ports.conf
Listen 443
7) add these to your /etc/apache2/sites-available/ssl after the part that says "Possible values include: debug, info, notice, warn, error, crit..."
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem
8) type at the terminal again
sudo /etc/init.d/apache2 restart
..:: E17 (Enlightenment)
..::
Install E17 (enlightenment) [ubuntu dapper and edgy]
1) add the respective repository to /etc/apt/sources.list for your release. Dapper uses:
deb http://edevelop.org/pkg-e/ubuntu dapper e17
deb-src http://edevelop.org/pkg-e/ubuntu dapper e17
but edgy uses:
deb http://edevelop.org/pkg-e/ubuntu edgy e17
deb-src http://edevelop.org/pkg-e/ubuntu edgy e17
2) then type
sudo wget "http://lut1n.ifrance.com/repo_key.asc" -O /root/key.asc
sudo apt-key add /root/key.asc
sudo apt-get update
sudo apt-get install enlightenment
3) logout of gnome (or kde). At the GDM login menu, select your session as enlightenment, login, and explore.
..::
Disable the desktop scrolling
..::
Run amarok
For some people, running amarok reveals the splash screen and then nada. Left click the desktop and open Lost Windows. Amarok should be there. Clicking Amarok will open a small tiny window that you can double click on to fullscreen amarok.
..::
Stop E17 from eating windows (like gaim, amarok, azureus)
E17 is set up to retake your close button. A lot of apps have changed the close button to instead minimize the app, and a lot of apps have changed the minimize button to minimize to tray. Open the settings for any app that E17 is eating windows for and disable the minimize to tray, and minimize on close functions. The applications will now minimize correctly.
..::
Enable multimedia keys (xev, xmodmap, and erme)
1) type
wget http://www.c7obs.net/~adi/projects/perl/erme.current
chmod 700 erme.current
./erme.current &
xev
2) Click the window that xev pops up. Press your multimedia key to see what keycode the key has. Then make a file with keycodes corresponding to XFree named keys. This is mine for my Logitech RF Wireless iTouch that i save in ~/iTouch.conf:
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
keycode 129 = XF86Music
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 160 = XF86AudioMute
keycode 162 = XF86AudioPlay
keycode 164 = XF86AudioStop
3) Save this as your_keyboard.conf and type
xmodmap whatever_you_saved_your_conf_file_as.conf
4) I have my music control buttons set as globals in amarok, but volume will need to be set using the
PCM volume script. In Erme, add a key. Set the action to 'exec', set the key to the name you assigned the keycode in your conf file. Then set the parameters to the function you want to assign it to. For example, my mute button is assigned as such:
key = XF86AudioMute
action = exec
parameters = volmute toggle
..:: Credits
Post Last Updated: Nov 5, 2006 12:41 pm