Ubuntu

Aus Programmers Guide

(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
Zeile 6: Zeile 6:
<br>  
<br>  
 +
 +
== Hilfreiches auf der Konsole ==
 +
 +
Hilfreiche Anzeigetools zur Netzwerkaktivität:
 +
 +
== Installierte Pakete anzeigen  ==
== Installierte Pakete anzeigen  ==
Zeile 31: Zeile 37:
</source>  
</source>  
-
<br>
+
<br>  
== SCP  ==
== SCP  ==

Version vom 17:10, 21. Nov. 2011

Inhaltsverzeichnis

Ist ein Neustart nötig / Reboot required

if [ -f /var/run/reboot-required ]; then echo "jepp"; fi


Hilfreiches auf der Konsole

Hilfreiche Anzeigetools zur Netzwerkaktivität:


Installierte Pakete anzeigen

dpkg --get-selections


Prozessortakt / CPU Performance on Startup

To start up Ubuntu in "performance" and not in the "ondemand" mode, you have to run the following "script" as root on startup

#write the script
echo '#!/bin/bash
echo "performance" | tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "performance" | tee /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
exit 0' > /etc/init.d/poweron
#make it executable
chmod +x /etc/init.d/poweron
#add to autostart
update-rc.d poweron defaults 99 01


SCP

Datei kopieren

#Kopiert die test.txt zum 2.Rechner
scp -r /home/<user>/test.txt username@192.168.0.1:/home/<user>/


VMWare-Tools

#Header und den gcc Compiler installieren
sudo apt-get install linux-headers-`uname -r` build-essential psmisc
#evtl bei nem VMX:
sudo mount /dev/cdrom /media/cdrom0/
#kopieren und entpacken der Dateien
cp /media/cdrom0/VMwareTools-4.0.0-193498.tar.gz /tmp/
cd /tmp/
tar xvf VMwareTools-4.0.0-193498.tar.gz
cd vmware-tools-distrib/
sudo ./vmware-install.pl
#What is the location of the directory of C header files that match your running kernel?
/lib/modules/2.6.28-18-server/build/include/


SSH

Siehe dazu: SSH

DNS

"server" is the real domain xxx.dyndns.org
roy@machine:~$ ssh user@server
ssh: Could not resolve hostname
 
roy@machine:~$ ping server
PING server (xx.xx.xx.xx) 56(84) bytes of data.
64 bytes from port-xxx-xxx-xxx-xxx.dynamic.qsc.de (xx.xx.xx.xx): icmp_seq=1 ttl=56 time=93.6 ms
64 bytes from port-xxx-xxx-xxx-xxx.dynamic.qsc.de (xx.xx.xx.xx): icmp_seq=1 ttl=56 time=91.9 ms
64 bytes from port-xxx-xxx-xxx-xxx.dynamic.qsc.de (xx.xx.xx.xx): icmp_seq=1 ttl=56 time=90.0 ms
64 bytes from port-xxx-xxx-xxx-xxx.dynamic.qsc.de (xx.xx.xx.xx): icmp_seq=1 ttl=56 time=89.3 ms
^C
--- server ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 89.391/91.242/93.623/1.697 ms
#seems okay
 
sudo vim /etc/nsswitch.conf
#remove the NOTFOUND clause
 
roy@machine:~$ ssh user@server
Warning: Permanently added the RSA host key for IP address 'xx.xx.xx.xx' to the list of known hosts.
user@servers password: xxx
 
Linux server2.6.32-25-generic #44-Ubuntu SMP Fri Sep 17 20:26:08 UTC 2010 i686 GNU/Linux
Ubuntu 10.04.1 LTS
...
 
#allright :-)

to setup a own DNS see DNS-Server

Multimedia

Rip VCD or SVCD to MPG-File

vcdxrip
#copy the VCD into the current folder and name it "avseq01.mpg"
 
vcdxrip -p
#same but show the progressbar
 
#if these examples wouldn't work
vcdxrip -i /dev/sr0 -p


Merge two or more Video-Files

#first way:
sudo apt-get install mencoder mplayer
cat video1.mpg video2.mpg > compiled.mpg
#Repair...
mencoder -forceidx -oac copy -ovc copy compiled.mpg -o final.mpg
#
#OR
#
#second way
sudo apt-get install mpgtx
mpgtx -j video1.mpg video2.mpg -o final.mpg
#
#an avi Example
mencoder -oac copy -ovc copy 1.avi 2.avi -o 1and2.avi

convert and burn these file

My favorite way to convert the MPG-File to DVD-Standard is the graphical Coding Program "DeVeDe". Once created the Image burn it with a Standard-Tool in your Distribution.

Ubuntu von einer CF-Card laufen lassen

Mein Ubuntu-Server läuft mit einer CF-Karte sehr stabil, ich habe allerdings diese 8GB-Karte auch nich vom billigsten Hersteller gekauft und auf die Übertragungsgeschwindigkeiten (Lese-/Schreibgeschwindigkeit) geachtet.

Das Ergebnis des Tests der Geschwindigkeiten sieht so aus:
roy@server:/s$ sudo hdparm -Tt /dev/sda
[sudo] password for roy:
/dev/sda:
Timing cached reads: 396 MB in 2.00 seconds = 197.51 MB/sec
Timing buffered disk reads: 68 MB in 3.08 seconds = 22.04 MB/sec
Persönliche Werkzeuge