debian
14 commands for basic Postgres administration
psql is a CLI client for Postgres administration, psql allows:
– Connect to the server
– Create DB
– Admin users
– Execute SQL queries and perform administration tasks in general.
How to install Debian, expert mode
Debian is a highly recommended distribution for server environments due to:
- His version release philosophy. Debian does not have a fixed cycle to release new versions, but each version is released once the development team considers it stable enough (released when it is ready).
- Packages inclusion policy: only stable and well-tested packages are included.
- Its robustness and stability.
XFCE: Resolve Print Screen does not work
In Debian XFCE Prt Scr key is not associated with the command xfce4-screenshoter, utility to perform screen captures, if we want to set this shortcut to make screenshots we must follow the following steps
How to know if a package is installed
We can use the aptitude command to know if a package has been installed on Debian GNU/Linux or derivative. In CentOS/RHEL/Fedora you can use yum
How to know the installed version of Debian/Ubuntu?
We can know the version of Debian / Ubuntu we have installed by running the following command:
$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"
Handle NTFS partitions in GNU/Linux
To handle NTFS partitions in GNU/Linux you should install the package ntfs-3g
Note: From April 2011 the ntfs-3g and ntfsprogs projects joined forces so now everything is in a single suite: ntfs-3g.
Most likely your distribution may already have installed the suite ntfs-3g else you can do it by exec
Debian/Ubuntu
$ sudo apt-get install ntfs-3g
CentOS/Fedora/RHEL
# yum install ntfs-3g
Find duplicated files in GNU/Linux
One of the easiest and safest ways to find duplicate files on GNU / Linux files is using the tool fdupes, fdupes find duplicate files comparing the file sizes, making a check MD5 followed by a byte to byte comparison.