To enable the connection to a host without password, launch from the machine from where you want to connect : ssh-copy-id [<login>@]<host>
.
When installing Debian Jessie in a virtual machine, the numlock is disabled by default. To enable it by default, you should do the following :
/usr/bin/numlockx on &
to the end of file /etc/X11/xinit/xinitrc
.
When compiling for IA-32 under a AMD64 enviroment (by passing the -m32
option to both compiler and linker), the compiler will complain about missing headers. To fix this, install g++-multilib
package.
uname -a
,lsb_release -a
(package lsb-release, with -
, not _
),cat
…/proc/version
,/etc/issue
,/etc/issue.net
,/etc/*release
,/etc/*version
.http://www.binarytides.com/linux-commands-hardware-info/
lscpu
,lshw -short
,hwinfo --short
,df -h
,free
,cat /proc/
…cpuinfo
,meminfo
,sensors
,cpufreq-info
.
To give a user same rights as for root through sudo, add a file in /etc/sudoers.d/
with following content :
<user> ALL=(ALL) ALL
where <user>
is the user's login.
visudo
should be used to edit this file, but it's not needed. The content of the created file is immediately take in account by sudo.
To avoid this error when sudoing, following conditions must be met (from http://askubuntu.com/questions/59458/error-message-when-i-run-sudo-unable-to-resolve-host-none) :
/etc/hostname
must contain <hostname> (hostname <hostname>
command works only until next reboot),/etc/hosts/
where <hostname>
points to 127.0.0.1
./etc/hosts
will not survive to a reboot. You should then have a comment at the head of your /etc/hosts
file, which indicates that you have to modify a file in /etc/cloud/templates
, but the given file may not be the correct one. Under Debian, for example, you have to modify hosts.debian.tmpl
file, not hosts.tmpl
.
What follows may only concern ARM architectures ; it was not tested on x86 architectures.
It seems that you have to install the ntfs-3g package before installing the usbmount package, or the NTFS devices will only be read-only.
ntfs fuseblk
to FILESYSTEMS
in /etc/usbmount/usbmount.conf
The devices will be accessible under /media/usb…
.
The fdisk -l
command will show if your USB device is recognized (recognized does not means mounted).
Trouble with NTFS devices auto-mounting : https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774149.
ntpdate <server>
, with <server>
, a NTP server (ntp.ubuntu.com
for example),hwclock
,hwclock –systohc
,hwclock –hctosys
.
For each Wifi network, add following in the /etc/wap_supplicant/wpas_supplicant.conf
network={ ssid="<ssid>" scan_ssid=1 psk="<key>" key_mgmt=<mgmnt> }
Replace the entry with correct values. <mgmnt>
can be something like WPA-PSK
or NONE
(without double-quotes!). scan–ssid
is for hidden network, but should also work for not hidden network. psk
can be omitted when the network is open.
wpasupplicant
package,wpa-passphrass <SSID> <key>
, where <SSID>
is the SSID of the WiFi network, and <key>
, the corresponding key. You should obtain something like :network={ ssid="<SSID>" #psk="<key>" psk=3a19d8ecd12eff56bbebd67af8e4c14e1b4b5fb1a278f7e5c474ad252853a1d9 }
/etc/network/interfaces
, insert :auto wlan0 iface wlan0 inet dhcp wpa-ssid <SSID> wpa-scan-ssid 1 # If the SSID id hidden. wpa-psk <psk>
where <SSID>
is the SSID of the WiFi network, and <psk>
the hexadecimal string right of the uncommented above psk=
entry.
ifup wlan0
.To change hostname :
hostname <name>
(you must logout to see the change),/etc/hostname
.
How to correctly set the hostname to avoid some error messages (for example unable to resolve host …
with sudo): https://askubuntu.com/questions/59458/
You may want to backup the entire www-data account (which contains the web pages) using scp or rsync, but you get a message like protocol version mismatch – is your shell clean?
. This is because the the shell for this account is a restricted one (probably /usr/sbin/nologin
, as you will see in /etc/passwd
).
To fix this :
rssh
package,/etc/passwd
so the shell will be /usr/bin/rssh
(bin
, not sbin
) for the desired account,/etc/rssh.conf
accordingly.To kill the a TCP connection without having to stop the corresponding program:
sudo ss -K dst <IP> [dport <port>]
An alternative to scp
, which allows to resume an interrupted transfer:
rsync --append-verify [--progress] [-e ssh] <src> <dest>
-e ssh
should be the default, but may be useful to add some parameters to ssh (put ssh
and its parameters between quotes then),--progress
is to display the progress.
Can be used directly, or after an aborted scp
.