Tuesday, October 04, 2005
linux: misc
.To get access to more packages through 'apt', edit /etc/apt/source.list and append ' contrib non-free' after 'main' at the end of lines
ex: 'deb ftp://ftp.fr.debian.org/debian/ stable main' becomes
'deb ftp://ftp.fr.debian.org/debian/ stable main contrib non-free'
.When downloading a file, check its integrity with 'gpg' if it has a pgp key and with 'md5sum' if it has an md5 signature.
'gpg' requires 'gnupg' package, read 'man gpg' for more information, you need to be connected to a gpg key server, then run it with the --verify option
to use md5sum, do as follow: md5sum -v -c textfilewithmd5keys
.To reveal the kernel version you are currently running, run 'uname -r'
.By default, 'ping' command goes on and on forever, which is quite annoying => use it with '-c 3' option
ex: ping -c 3 www.google.com => it will send only 3 ping request
=> a good idea would be to create a ping alias refering to ping -c 3 command in your /home/user/.bashrc file
=> therefore when calling 'ping' as usual, it will automatically call 'ping -c 3' instead -- on a totally transparent manner
.You can have root super powers without having to log as root each time. You can install sudo and/or fakeroot package. Then when you start your command line in bash with sudo or fakeroot you will do it with root super powers.
To enable a user to have sudo, you need to add its name in /etc/sudoers
.'mkdir' creates a single folder
'mkdir -p' creates all the required folders at once (ex: 'mkdir -p /folder1/folder2' will create both folder1 and folder2 where 'mkdir /folder1/folder2' would have generated an error message if /folder1 does not already exist)
.If you have a file you want to keep as secret as possible on your computer, run 'chmod 600 myfile'
then user rights on your file will be:
-rw------- 1 remy remy 0 2005-10-04 01:27 myfile
ex: 'deb ftp://ftp.fr.debian.org/debian/ stable main' becomes
'deb ftp://ftp.fr.debian.org/debian/ stable main contrib non-free'
.When downloading a file, check its integrity with 'gpg' if it has a pgp key and with 'md5sum' if it has an md5 signature.
'gpg' requires 'gnupg' package, read 'man gpg' for more information, you need to be connected to a gpg key server, then run it with the --verify option
to use md5sum, do as follow: md5sum -v -c textfilewithmd5keys
.To reveal the kernel version you are currently running, run 'uname -r'
.By default, 'ping' command goes on and on forever, which is quite annoying => use it with '-c 3' option
ex: ping -c 3 www.google.com => it will send only 3 ping request
=> a good idea would be to create a ping alias refering to ping -c 3 command in your /home/user/.bashrc file
=> therefore when calling 'ping' as usual, it will automatically call 'ping -c 3' instead -- on a totally transparent manner
.You can have root super powers without having to log as root each time. You can install sudo and/or fakeroot package. Then when you start your command line in bash with sudo or fakeroot you will do it with root super powers.
To enable a user to have sudo, you need to add its name in /etc/sudoers
.'mkdir' creates a single folder
'mkdir -p' creates all the required folders at once (ex: 'mkdir -p /folder1/folder2' will create both folder1 and folder2 where 'mkdir /folder1/folder2' would have generated an error message if /folder1 does not already exist)
.If you have a file you want to keep as secret as possible on your computer, run 'chmod 600 myfile'
then user rights on your file will be:
-rw------- 1 remy remy 0 2005-10-04 01:27 myfile