Autres
AideEnLigne
CahierDeBrouillon
Présentation
Administration

MesLectures
[Journal d'Ophelia]
[Blog Larnac]
[Traitement texte en ligne]
[Kim Khal]

Informations
[Rue 89]
[Tele libre]

DNS etc
[Robtex]
Logins
Votre ID: 111
Nom:
Login utilisateur
Mot de passe éditeur

ComputingUnixLinux

+Unix admin horror stories
+How to Manage Btrfs Storage Pools, Subvolumes And Snapshots on Linux
+Unix History
The Unix Heritage Society : Unix sources, history, etc. http://www.tuhs.org/
Kernigan explaining pipes, it worth it! https://www.youtube.com/watch?v=tc4ROCJYbm0
Papers could be found at http://citeseerx.ist.psu.edu/index . Many documents about computing science here.
+Hardware compatibility and free os
+changer de clavier (fr us, ..) sous Linux
  • Si serveur X : setxkbmap fr
  • si pas de serveurs X : loadkeys fr
+Install 32 bits softwares on Linux 64bits
Probleme si on a installé une version 64 bits (et pas une version "32-Bit / 64-Bit Multiarch"). C'est le cas par exemple pour installer Teamviewer v9 (et 10 ?).

1-install gdebi:

 dpkg --add-architecture i386
 apt-get update
 apt-get install gdebi

2-utiliser debi (debi is a deb file installer with dependances !! )

 debi install teamviewer_linux.deb

+Click on Youtube and read on VLC
  1. Install VLC
  2. Install youtube-dl
  3. vlc $(youtube-dl -g $1) &
+Liens Unix & Linux
Linux AuFS? Union File System http://www.thegeekstuff.com/2013/05/linux-aufs/
Guix package manager https://www.gnu.org/software/guix/
Guix for Fedora, Debian, CentOS? https://matutine.gitlab.io/2016/09/26/gnu-guix-dans-un-environnement-de-supercalculateurs.html
CDE to package an aplication for any linux http://www.pgbovine.net/cde.html
Partition image for Linux http://www.partimage.org/
Encore un tutorial chroot http://karma-lab.net/magie-chroot
zpaq backup for windows, Linux, etc. http://mattmahoney.net/dc/zpaq.html
bup a backup git based for Linux https://github.com/bup/bup
RAM-only PXE boot & the "smallest" diskless Linux box TFTP PXE http://eduardo-lago.blogspot.fr/2012/06/ram-only-pxe-boot-smallest-diskless.html
imaging solution with TFTP PXE: FOG project http://www.fogproject.org/?q=node/1
backup tools : rdiff-backup, rsync, rsnapshot, duplity etc. http://maniatux.fr/index.php?article486/sauvegarde-rsync-avec-roulement-de-3-jours
old Suse versions ftp://ftp5.gwdg.de/pub/linux/suse/discontinued/
gamin to monitor file and directories access https://people.gnome.org/~veillard/gamin/
Sysdig to debug/trace a process http://www.sysdig.org/ (see also Systemtap, Dtrace, Dprobes, strace, ..)
Care soft : to reproduce soft environment http://reproducible.io/
Docker articles (a lire)
The Unix Heritage Society [old version of Unix PDP11, ..] http://www.tuhs.org/
Xwindows & Xming troubleshooting debugging http://www.straightrunning.com/XmingNotes/trouble.php
Cluster Debian avec DRBD et GFS2 http://www.unixgarden.com/index.php/gnu-linux-magazine/cluster-debian-avec-drbd-et-gfs2-2#1-ap%C3%A9ritif
Deprecated linux networkin commands [iproute2, ip command] https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-commands-and-their-replacements/
Boot EFI UEFI: voir ComputingWindows et boot EFI
GPT, UEFI, GUID Partition table http://fr.wikipedia.org/wiki/GUID_Partition_Table
Unix & Linux Free books http://freecomputerbooks.com/unixCategory.html
GNU/Linux? Free pdf books http://cfajohnson.com/computers/pdflinks.shtml
undelete files under ext3 extgrep http://carlo17.home.xs4all.nl/howto/undelete_ext3.html
undelete files under ext3 & ext4 extundelete http://extundelete.sourceforge.net/
Gluster distributed file system http://www.gluster.org/
CEPH distributed file system http://ceph.com/
CEPH ; NFS over RBD http://www.sebastien-han.fr/blog/2012/07/06/nfs-over-rbd/
Small Linux PC overview http://raymii.org/cms/p_Small_Linux_PCs_overview
Trouble-Maker: a linux training tool http://trouble-maker.sourceforge.net/
Unix Rosetta stone for SysAdmin? http://bhami.com/rosetta.html
Shell tutorials

Advanced bash scripting http://tldp.org/LDP/abs/html/
A plethore of Bourne Shell links http://cfaj.freeshell.org/shell/
Bourne Shell Quoting Guide http://www.mpi-sb.mpg.de/~uwe/lehre/unixffb/quoting-guide.html#para:sh-golden-rules
Bourne Shell tricks http://www.perlcode.org/tutorials/shell/tricks.txt
How tro write a shell script. Elementaire mais assez complet. http://vertigo.hsrl.rutgers.edu/ug/shell_help.html
Shell advanced tricks from UnixReview? http://www.networkcomputing.com/unixworld/tutorial/018/018shell.html
Good shell tut. http://www.ooblick.com/text/sh/
Shell tips and tricks http://www.shelldorado.com/shelltips/
Another one is http://www.satlug.org/present/presentation-05.00.html
again another one http://www.perlcode.org/tutorials/shell/tricks.txt
Bash Shell Programming tres complet !! http://www.tldp.org/LDP/abs/html/

How to install Beowulf [bootp, replication, http://www.traduc.org/docs/HOWTO/vf/Beowulf-HOWTO.htm
Linux Kernel Virtual Machine KVM http://www.linux-kvm.org/page/Main_Page
FUSE http://fuse.sourceforge.net/
Linux on line applications http://www.linux.org/apps/index.html
Terminal Server Client http://www.gnomepro.com/tsclient/
Linux Virtual Server http://www.linuxvirtualserver.org/
Partition image http://www.partimage.org/
Virtual Linux (to be updated) http://prdownloads.sourceforge.net/virtual-linux
Trinux http://www.trinux.org/
Tommsrtbt http://www.toms.net/rb/
WuFTPD? FAQ http://www.wu-ftpd.org/wu-ftpd-faq.html
How much Linuw Swap ? http://www.linux.com/news/software/applications/8208-all-about-linux-swap-space
USB Video Class Linux device driver http://linux-uvc.berlios.de/
File system in user space http://fuse.sourceforge.net/
Linux Soft RAID hosto http://gmauleon.org/french/main.php?menuItem=Howtos&tabItem=Linux-SoftRaid
Unicode and Unix/Linux? http://czyborra.com/
Undelete under Linux w/ fsdebug http://www.ibiblio.org/pub/Linux/docs/HOWTO/Ext2fs-Undeletion
UNIX Administration Hints & tips http://www.sap-basis-abap.com/unix/index.htm
Linux Device Drivers [book] http://www.xml.com/ldd/chapter/book/index.html
Burn CDROM http://burn-cd.sourceforge.net/
Cours Linux. Applis Linux pour l'Enseignement http://www.ac-creteil.fr/reseaux/systemes/linux/
Kernel 2.4 internals http://www.traduc.org/docs/guides/lecture/lki/lki.html#id2498292
Linux Kernel Hacking http://lwn.net/
Linux Kernel internals http://www.science.unitn.it/~fiorella/guidelinux/tlk/node5.html
User Filesystem [virtual file system] http://fuse.sourceforge.net/
RPM repository http://rpmfind.net/linux/rpm2html/search.php?
Gzip recovery Toolkit http://www.urbanophile.com/arenn/hacking/gzrt/gzrt.html
YaoFeng?'s books http://octopus.cdut.edu.cn/~yf17/
Linux Foomatic [CUPS etc.] http://www.linuxprinting.org/foomatic.html
Linux Soft distribution http://www.linuxsoft.cz/en/
Webmin guide http://www.swelltech.com/support/webminguide/
SUSE Linux website http://portal.suse.com/sdb/en/2001/03/lmuelle_suselinux_internet.html
ACL
Linux extended attributes and ACLs http://acl.bestbits.at/
Mise en oEUvre et utilisation http://www.linuxfrench.net/gnu_linux/comment_fonctionnent_les_acl_posix_sous_linux..._article1463.html
Linux ACLs and inheritance http://www.suse.de/~agruen/acl/linux-acls/online/
Linux ACL article 1 http://lwn.net/1999/1007/kernel.php3
Linux ACL article 2 http://lwn.net/1999/0715/a/ext2ACL.html
RPM Bone net http://rpm.pbone.net/index.php3/stat/11/limit/18/dl/40/vendor/922/com/Freshrpms_net.html
How to configure LINUX + ADSL http://linux.gegeweb.net/adsl-pppoe_1.html#h1
G4U Harddisk image cloning http://www.feyrer.de/g4u/
Linux extended attributes and ACLs http://acl.bestbits.at/
Linux on line applications http://www.linux.org/apps/index.html
Linux Ipchains http://www.rustcorp.com/linux/ipchains/
Linux Kernel Hacking http://lwn.net/
Linux Router Project (dead) http://www.linuxrouter.org/
Terminal Server Client http://www.gnomepro.com/tsclient/
Linux Virtual Server http://www.linuxvirtualserver.org/
Partition image http://www.partimage.org/
Scyld Beowulf cluster http://www.scyld.com/
Virtual Linux (to be updated) http://prdownloads.sourceforge.net/virtual-linux
Trinux http://www.trinux.org/
Tommsrtbt http://www.toms.net/rb/
WuFTPD? FAQ http://www.wu-ftpd.org/wu-ftpd-faq.html
How to chroot Apache under Linux & Solaris http://penguin.triumf.ca/chroot.html
+Reparer une install Linux ou Grub cassee

Avec un live CD, il faut utiliser grub-install. Mais on alors besoin de /dev /proc et /sys. On utiliser pour cela la commande mount -o bind. NB: avec df, on ne voit pas /proc /sys et /dev ; il faut utiliser la commande mount pour cela.

 # mount /dev/hda5 /mnt/hda5
 # chroot /mnt/hda5/
 [chroot]# grub-install /dev/hda
 /dev/hda: Not found or not a block device.
 [chroot]# exit
 exit
 # mount -o bind /proc /mnt/hda5/proc/
 # mount -o bind /dev  /mnt/hda5/dev/
 # mount -o bind /sys  /mnt/hda5/sys
 # df -h
 Filesystem            Size  Used Avail Use% Mounted on
 /dev/hda3             9.5G  3.9G  5.1G  44% /
 tmpfs                 311M     0  311M   0% /dev/shm
 AFS                   8.6G     0  8.6G   0% /afs
 /dev/hda1             9.7G  5.0G  4.2G  55% /mnt/hda1
 /dev/hda5             9.5G  3.8G  5.3G  42% /mnt/hda5
 # chroot /mnt/hda5
 [chroot]# grub-install /dev/hda
 Installation finished. No error reported.
 This is the contents of the device map /boot/grub/device.map.
 Check if this is correct or not. If any of the lines is incorrect,
 fix it and re-run the script `grub-install'. 

 # this device map was generated by anaconda
 (hd0)     /dev/hda
 [chroot]# exit
 exit
 #

Voir aussi le post sur http://forum.ubuntu-fr.org/viewtopic.php?id=358656 et les liens dans ce thread qui indiquent d'autres pistes comme https://help.ubuntu.com/community/Grub2/Installing#Fixing_a_Broken_System

+utiliser lvm : exemple
  • augmenter le volume du LogVol05?

  umount /home 
  e2fsck -f /dev/VolGroup00/LogVol05            #noter le nombre de blocks
  lvresize -L+10G /dev/VolGroup00/LogVol05      #ajouter 10 GB
  e2fsck -f /dev/VolGroup00/LogVol05            
  resize2fs /dev/VolGroup00/LogVol05            #ajuster le fs
  mount /home 

NB: le nombre de blocks sera utilisé pour revenir a la taille d'origine

  • diminuer le volume du LogVol05?
  umount /home 
  e2fsck -f /dev/VolGroup00/LogVol05           
  resize2fs /dev/VolGroup00/LogVol05 <nbblocks> #ou alors option -r de lvresize qui utilise fsadm
  lvresize -L-10G /dev/VolGroup00/LogVol05     #enlever 10GB
  e2fsck -f /dev/VolGroup00/LogVol05

+X11 servers & clients (Unix or Windows)
X2go is a new protocol over a low bandwidth http://wiki.x2go.org/doku.php/doc:newtox2go
+X11 security
Ssh -X is not very secure. Put this in you ~/.ssh/config to enhance security. Voir aussi la conférence ComputingSecurity
 Host stokes
      Hostname stokes.comp.prv
      User cmic
      ForwardX11? yes
      ForwardX11Trusted? yes

 Host *
      ForwardX11? no
      ForwardAgent? no
+Debian & Mint installations & docs

Writing system units for systemd

Article http://hokstadconsulting.com/devops/writing-systemd-units


Debian Mise a jour sécurité

 #aptitude update
 #aptitude full-upgrade

Ou bien apt-get update suivi de apt-get dist-upgrade

avec nettoyage éventuel des paquets ...

 #aptitude clean


Debian recovering from forgetted root password

  • Boot into grub, select single user but do not press enter.
  • Press e to go into edit mode.
  • Scroll down to the kernel line you will boot from, it starts with "linux /boot/vmlinuz-……."
  • Scroll to the end of that line and press space key once and type init=/bin/bash.
  • Press Ctrl X to boot.
  • mount -o remount, rw /
  • passwd (and type new root passwd
  • sync
  • type ^D to reboot

Install minidlna sous systemd
Sous Debian 8 (Jessie), ajout du fichier pour systemd
 #cat /etc/systemd/system/minidlna.service
 [Unit]
        Description=Minidlna service
        Documentation=man:minidlnad(1)
 [Service]
        Type=forking
        ExecStart?=/usr/bin/minidlnad -f /etc/minidlna.conf -u minidlna
        PIDFile=/var/run/minidlna/minidlna.pid

Ensuite, démarrer minidlna (par defaut, minidlna.service) et stop pour arrêter :

 #systemctl start minidlna

2016-11-10 12:12:52


reconfigurer/voir la config d'un package debian

Ex: reconfigurer la locale :

 #dpkg-reconfigure locale

Ex: voir comment est configuré le package tzdata :

 #debconf-show tzdata

Voir aussi debconf(7)


Choisir xfce

  • A l'installation, taper sur Tab et ajouter a la fin de la ligne de commande desktop=xfce
ou bien choisir le menu "Advanced options" puis "Alternate desktop environments", et choisir Xfce

When prompted to select the task to install, make sure you click "Desktop Environment"

  • Sinon, en fonctionnement, supprimer Gnome et installer Xfce4

cf https://wiki.debian.org/Xfce#Run_Xfce

2014-02-26 14:17:53 -- Cmic


Debian WiFi?

Sur Wheezy, petit probleme d'install de la carte Interl 2100 FIXME : Il faut chargerle microcode (firmware), soit à l'install soit après : le Dell D600 réclame le microcode ipw2100-1.3.fw et tigon/tg3_tso5.bin (??)

Voir http://wiki.debian.org/fr/ipw2200 (pour le firmware Intel 2100/2200)
Voir http://wiki.debian.org/fr/WiFi/HowToUse (pour la config. wifi)

clavier console fr

  • Install de Wheezy ok, mais clvier qwerty. Arghh2014-05-21 16:23:11
  • loadkeys fr ne fonctionne pas
  • dpkg-reconfigure keyboard-configuration : pas glop
  • apt-get install console-setup ; Clavier fr OK

autres sources de packages
En principe plus rapide.. Remplacer http://ftp.us.debian.org/debian/ par http://mirrors.linode.com/debian/ dans le fichier /etc/apt/sources.list
Installation de Mint sur un portable ASUS P2 520LA-XO0456T (by Seb Sauvage)

upgrade debian from Wheezy 7 to Jessie 8

  • from jessie to stretch il faut aussi

 apt install debian-archive-keyring

  • first: backup /etc, /var/lib/dpkg, /var/lib/apt/extended_states and the output of dpkg --get-selections "*" (the quotes are important). If you use aptitude /var/lib/aptitude/pkgstates.
  • second: the upgrade process must not be done under X11 (or should fail...). Use no graphic screen instead
  • third: make sure all packets are in upgradable state dpkg -audit

no packet is half-installed : aptitude -> g to install what is planned to be installed

+weak host model and unix
weak host model and strong host model on linux : "... IPv6 implements a "strong host model" whereas Linux IPv4 implements a "weak host model". In the strong model, IP addresses are associated with interfaces; in the weak model, they are associated with the host...."

Sous Linux, supprimer ce comportement :

 sysctl net.ipv4.conf.<INTERFACE>.arp_ignore=1 ou 2, voire 8
+Linux commands kernel 2.6
  • /sys sysfs nouveau avec Kernel 2.6 en gros idem à proc
  • lspci -vv lecture du repertoire /sys
  • lsb_release -a Show Linux version, code name, etc.
  • systemctl
  • --------------- net tools -------------------
program obsoleted by
arp ip neigh
ifconfig ip addr
ipmaddr ip maddr
iptunnel ip tunnel
route ip route
nameif ifrename
mii-tool ethtool

  • dpkg-query -l 'package' /* list package content */
  • dpkg-query -S 'command' /* shows which package includes 'command' */
  • lsblk : list of devices blocks
  • blkid : block device ids
  • hwinfo
  • sfdik & cfdisk
  • strace : traces functions calls of an exec
  • Simple server http pour partager le repertoire courant: python -m SimpleHTTPServer?:9988
  • partclone : clonage d'une partition
  • nmcli : network manager command line
  • Support de exFat (file system >4GB/file, etc: aptitude install exfat-fuse exfat-utils
  • dmidecode : acces to all DMI info
  • lshw utility : acces to all hardware info (constructor, serial, BIOS, vendor, etc.
  • hosnamectl : idem.
  • imvirt script : a Perl script to detect if we are on a VM
+Usefull command line tools
dstat & sar: iostat, vmstat, ifstat and much more in one package
htop & iotop: Process, memory and io monitoring.
slurm: Resource mabagement of cluster nodes
ttyrec & ipbt: Record and play back terminal sessions.
screen, dtach, tmux, byobu: Keep your terminal sessions alive.
mtr: traceroute 2.0 combines traceroute and ping
multitail: See your log files in separate windows.
socat & netpipes: Directing stuff easily in and out of sockets.
tpp: Presentation ("PowerPoint?") tool for terminal.
iftop, iptraf & nethogs: To see where your traffic goes.
siege & tsung: Command line load test tools.
duplicity & rsyncrypto: Encrypting backup tools.
lftp: Does FTPS. Can mirror, kinda like rsync.
curl: Everybody's favorite HTTP toolbox.
ack: A better grep for source code.
rtorrent & aria2: Command line torrent downloaders.
calcurse & remind + wyrd: Calendar systems.
ttytter & earthquake: Nice trendy Twitter clients :)
newsbeuter & rsstail: Command line RSS readers.
vifm & ranger: Alternatives to the midnight commander.
powertop: Helps conserve power on Linux.
cowsay & sl: I just couldn't resist. :o)
tig: A console UI for git.
cloc: Counts lines of code.
qalc: The best calculator. Ever. (For scripts too.)
ipcalc: For network assignments.
+Linux Full Circle Magazine