FuntooHowTo-Man

Print Friendly, PDF & Email


FuntooHowTo-Man

1      Références.1

2      Network Tool1

3      Interface. 1

4      User-Group. 2

4.1       Newgrp. 2

4.2       Usermod.2

4.3       Gpasswd.2

4.4       add/delete/modify groups. 2

4.5       add/delete/modify users. 2

4.6       Password. 2

5      Network. 3

6      File System : NTFS.. 3

7      Compression-décompression. 3

8      Mount4

8.1       Mount a ISO.4

9      SSH tips and tricks. 4

10        Wget.5

1      Références.

2      Network Tool

  • netstat -tup

    Active Internet connections (w/o servers)

    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name

    tcp        0      0 192.168.1.20:37360      93.184.219.20:https     ESTABLISHED 21819/firefox

    tcp        0      0 192.168.1.20:9000       192.168.1.21:4874       TIME_WAIT   –

    tcp        0  70768 192.168.1.20:9000       192.168.1.4:44890       ESTABLISHED 2162/perl

    tcp        0      0 192.168.1.20:37364      93.184.219.20:https     ESTABLISHED 21819/firefox

    tcp        0      0 192.168.1.20:37359      93.184.219.20:https     ESTABLISHED 21819/firefox

    tcp        0      0 192.168.1.20:37363      93.184.219.20:https     ESTABLISHED 21819/firefox

    tcp        0      0 192.168.1.20:9000       192.168.1.4:42497       ESTABLISHED 2162/perl

    tcp        0      0 192.168.1.20:37370      93.184.219.20:https     ESTABLISHED 21819/firefox

    tcp        0      0 192.168.1.20:3483       192.168.1.13:36601      ESTABLISHED 2162/perl

    tcp        0      0 192.168.1.20:3483       192.168.1.5:40746       ESTABLISHED 2162/perl

    tcp        0      0 192.168.1.20:3483       192.168.1.4:52480       ESTABLISHED 2162/perl

    tcp        0      0 192.168.1.20:36291      95.100.176.146:https    ESTABLISHED 21819/firefox

    tcp        0      0 192.168.1.20:37361      93.184.219.20:https     ESTABLISHED 21819/firefox

3      Interface

  • Pour supprimer-rajouter des shortcut Keybaord :  Settings-> Window Manager-> Keyboard Tab

 

4      User-Group

4.1      Newgrp

Newgrp

Usage: newgrp [-] [group]

4.2      Usermod.

Rajouter le groupe video à un utilisateur → usermod -aG video esa01

4.3      Gpasswd.

Rajouter le groupe video à un utilisateur

Usage: gpasswd [option] GROUP

Options:

  -a, –add USER                add USER to GROUP

  -d, –delete USER             remove USER from GROUP

  -r, –remove-password         remove the GROUP’s password

  -R, –restrict                restrict access to GROUP to its members

  -M, –members USER,…        set the list of members of GROUP

  -A, –administrators ADMIN,…

                                set the list of administrators for GROUP

Except for the -A and -M options, the options cannot be combined.

4.4      add/delete/modify groups

groupadd/groupdel/groupmod : Used to add/delete/modify groups in /etc/group

4.5      add/delete/modify users

useradd/userdel/usermod : Used to add/delete/modify users in /etc/passwd. These commands also perform various other convenience functions. See the man pages for more information.

useradd -m -G users,wheel,audio,video -s /bin/bash esa02

4.6      Password

Passwd esa02

 

5      Network

6      File System : NTFS

7      Compression-décompression

  • http://fr.wikipedia.org/wiki/Tar_%28informatique%29
  • Extraction (éventuellement pour un fichier ou un répertoire spécifique) :
tar -xvf archive.tar [fichier1... ]
  • Décompression + extraction (spécifique à certaines implémentations, comme GNU tar ou bsdtar) :
tar -xzvf archive.tar.gz
tar -xjvf archive.tar.bz2
tar -xYvf archive.tar.lzma
 
ZIP-Unzip
  • unzip filename.zip

 

8      Mount

  • mount -o username=esa //192.168.1.21/video-dvd/ /mnt/nas-video
  • mount -t cifs -o username=esa //192.168.1.21/video-dvd/ /mnt/nas-video
  • Pour monter un repertoire windows
  • mount -t cifs //192.168.1.25/share /mnt/windows -o username=eric,MyPaSsWoRd=xxxxxx -o lfs

8.1      Mount a ISO.

SO images are very easy to manipulate at the command line in Linux. To make an ISO image from a CD or DVD simply insert the disc into the drive and type:

dd if=/dev/cdrom of=filename.iso

This uses the dd command with the input set to /dev/cdrom and the output set to filename.iso. Change these values as necessary. Note that some Linux distros mount the cdrom drive to /media/cdrom.

To mount an ISO image and read it just as it was a CDROM loaded in the tray do the following:

mkdir /mnt/iso

mount -o loop -t iso9660 filename.iso /mnt/iso

The contents of the ISO can now be accessed in /mnt/iso.

9      SSH tips and tricks

  1. [root@storage ~]#
  2. [root@storage ~]# ~?
  3. Supported escape sequences:
  4.   ~.  – terminate connection (and any multiplexed sessions)
  5.   ~B  – send a BREAK to the remote system
  6.   ~C  – open a command line
  7.   ~R  – Request rekey (SSH protocol 2 only)
  8.   ~^Z – suspend ssh
  9.   ~#  – list forwarded connections
  10.   ~&  – background ssh (when waiting for connections to terminate)
  11.   ~?  – this message
  12.   ~~  – send the escape character by typing it twice
  13. (Note that escapes are only recognized immediately after newline.)

 

10      Wget.

http://www.debianworld.org/wget

Download d’un site complet des pdf :

wget -r -np -l9 -A ‘*.pdf’ http://kistren.polytech.unice.fr/cours/