Linux

gksudo gedit /boot/grub/menu.lst

Display problems / tips

  • Laptop beeldscherm knippert / flikkert in Ubuntu. Mogelijke oplossing: Probeer bij Administration/Screen and Graphics de 'Intel Experimental mode' te veranderen in i810.
  • start screen and graphic preferences:
displayconfig-gtk

Terminal

  • find an application's location:
whereis firefox
  • find a file's location:
locate menu.lst
  • reboot the system:
reboot
  • to tar a folder (with all subfolders and files):
tar czf backup.tgz thefolder
  • to untar a file:
tar xvzf file.tar.gz
  • search for a phrase in all files:
grep something *
  • to start ubuntu without GUI empty '/etc/X11/default-display-manager'. If you want to start it from the shell type 'gdm'
  • What to do when 'locate' gives the following error 'can not open `/var/lib/mlocate/mlocate.db': No such file or directory'?
sudo updatedb
  • cat - Concatenates files, or standard input, to standard output:
cat newmpeg.txt >> daily.txt
  • Alle processen weergeven met hun PID's
ps -A
  • zoekt naar naam binnen de actieve processen
ps -C naam
  • een proces beeindigen:
sudo kill 5943
  • copy a directory:
cp -r /home/hope/files/* /home/hope/backup
  • show last system messages:
tail /var/log/messages
  • get computer name / hostname
hostname

Installing software or libraries

  • You can use 'sudo apt-get install thunderbird' for installing software like thunderbird or any other program.
  • You can use 'sudo apt-build install libfreetype6' for installing a library. You can also use apt-get for that by saying: 'apt-get build-dep libfreetype6'
  • Use 'sudo dpkg -i filename.deb' to install a download .deb file.
  • Install RPM packages:
rpm -i software-2.3.4.rpm
  • of gebruik:
alien -i filename.rpm
  • In case of the following message “error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory” while installing/running something install the glibc library:
sudo apt-get build-dep glibc
  • 7-Zip installeren op Ubuntu
sudo apt-get install p7zip

Shell scripts

  • .sh extensie
  • execute a script in a terminal:
xterm -e /home/fileToExecute

Networking

  • “If you want to mount your NFS and samba file systems on ubuntu client machines you need to use the /etc/fstab file (short for filesystem table) keeps track of filesystems that you want to mount in static locations.”
  • You can use NFS for this with adding the share to /etc/exports on sharing computer. You can then mount to that from the client computer by creating an empty folder (ie. /mnt/testfolder) and then say:
mount 192.1680.104:/home/rick/srcfolder /mnt/testfolder
  • Na een wijziging in het /etc/networking/interfaces moet er een restart worden gegeven
sudo /etc/init.d/networking restart
  • Het instellen kan ook met ifconfig.
sudo ifconfig eth0 192.168.1.50 netmask 255.255.255.0 up
  • Networkadapter down:
ifdown eth1
  • Networkadapter up:
ifup eth1
  • For permanent changes in your network address change your network configuration file '/etc/network/interfaces'. more info

Arduino

Scite

C++

  • Time time; time.fileNameTag()

Hardware / USB

  • zoeken naar usb apparaten met 'ph' in de naam. (-vvvv is extra verbose)
lsusb -vvvv | grep ph
  • list all devices?
ls /dev/

Advanced

  • To disable gdm, from Gnome click System/Administration/Services and unclick Graphical Logic Manager (gdm)

Video

  • Exporteer de eerste 9 files uit een AVI naar losse jpg's: mplayer test.avi -vo jpeg -ao null -frames 9
  • Speel test.avi af in een x11 venster, maar het kan ook bijv. een video-out zijn: mplayer test.avi -vo x11

Discussion

Enter your comment:
BMOLK