Hot answers tagged

322

This is caused by a livelock when ntpd calls adjtimex(2) to tell the kernel to insert a leap second. See lkml posting http://lkml.indiana.edu/hypermail/linux/kernel/1203.1/04598.html Red Hat should also be updating their KB article as well. https://access.redhat.com/knowledge/articles/15145 UPDATE: Red Hat has a second KB article just for this issue here: ...


180

Many people seem to be afraid of mixing stable with testing, but frankly, testing is fairly stable in its own right, and with proper preferences and solution checking, you can avoid the "stability drift" that puts your core packages on the unstable path. "Testing is fairly stable??", you ask. Yes. In order for a package to migrate from unstable to testing,...


117

To find any expired repository keys and their IDs, use apt-key as follows: LANG=C apt-key list | grep expired You will get a result similar to the following: pub 4096R/BE1DB1F1 2011-03-29 [expired: 2014-03-28] The key ID is the bit after the / i.e. BE1DB1F1 in this case. To update the key, run sudo apt-key adv --recv-keys --keyserver keys.gnupg.net ...


96

I use kexec-reboot on nearly all of my production systems. It works incredibly well, allowing me to bypass the long POST time on HP ProLiant servers and reduce the boot cycle from 5 minutes to ~45 seconds. See: https://github.com/error10/kexec-reboot The only caveat is that it doesn't seem to work on RHEL/CentOS 6.x systems booting UEFI. But most sane ...


87

netstat -pln -l will list listening ports, -p will also display the process, -n will show port numbers instead of names. Add -t to only show TCP ports.


78

In my case, the error appears everytime I update my Linux kernel. It disappears when I restart the computer. I am using Arch Linux.


61

Simple: grep ^Package: /var/lib/apt/lists/ppa.launchpad.net_*_Packages Or more flexible: grep-dctrl -sPackage . /var/lib/apt/lists/ppa.launchpad.net_*_Packages For fancier querying, use apt-cache policy and aptitude as described here: aptitude search '~O LP-PPA-gstreamer-developers'


56

Congratulations and uh-oh. You've stumbled across one of the better things about ZFS, but also committed a configuration sin. First, since you are using raidz1, you only have one disk worth of parity data. However, you had two drives fail contemporaneously. The only possible result here is data loss. No amount of resilvering is going to fix that. Your ...


55

apt-utils contains the /usr/bin/apt-extracttemplates program which is used when packages need to ask you questions about how to be configured. This package being Priority: important, means it should really be installed except in rare circumstances. If there is configuration pending, dpkg-reconfigure [package] will perform it. If you missed configuring a ...


54

You can change the dependencies of a deb package like this: Unpack deb: ar x golden-linux.deb (will create i.e. three files: debian-binary control.tar.gz data.tar.gz) Unpack control archive: tar xzf control.tar.gz (will create: postinst postrm preinst prerm md5sums control) Fix dependencies in control (use a text editor) Repack control.tar.gz: tar --ignore-...


51

Press Ctrl+C or Ctrl+|.


48

The Debian Policy Manual has this to say about the version field, which answers some parts of your question: Format The format is: [epoch:]upstream_version[-debian_revision] The three components here are: epoch This is a single (generally small) unsigned integer. It may be omitted, in which case zero is assumed. If it is omitted then ...


48

This happens when dbus is restarted, but systemd-logind is not restarted. Just do the following: systemctl restart systemd-logind The solution is from here: https://major.io/2015/07/27/very-slow-ssh-logins-on-fedora-22/


45

Try this: openvasmd --user=admin --new-password=new_password


45

via apt-key: # curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - OK # apt-get update Ign:1 http://deb.debian.org/debian stretch InRelease Hit:2 http://security.debian.org stretch/updates InRelease Hit:3 http://deb.debian.org/debian stretch-updates InRelease Hit:4 http://deb.debian.org/debian stretch-backports InRelease ...


44

There are two methods for extracting SQL Grants from a MySQL Instance METHOD #1 You can use pt-show-grants from Percona Toolkit MYSQL_CONN="-uroot -ppassword" pt-show-grants ${MYSQL_CONN} > MySQLUserGrants.sql METHOD #2 You can emulate pt-show-grants with the following MYSQL_CONN="-uroot -ppassword" mysql ${MYSQL_CONN} --skip-column-names -A -e"...


44

If you are running this locally just use the following command to backup your database & zip it using gzip: mysqldump -u userName -p (passwordPrompt) yourDatabaseName | gzip -c > output.gz (Edit: fixed -c key)


44

Pressing "R" in an s_client session causes openssl to renegotiate. Try entering "rcpt to:" instead of "RCPT TO". You might also try tools that are more suited to SMTP-specific testing, such as Tony Finch's smtpc or swaks.


43

from man debsums: debsums -ce List changed configuration files.


43

danadam's solution can easily be adopted to retrieve the JDK (i.e. not JRE) path as required: JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") Looks for javac Java compiler (instead of java) included in JDK (but not JRE). Has no trailing / (stripped off by sed s:/bin... instead of s:bin...)


43

Simple and easy solution: just specify the unwanted packages with an extra - after each of them. Example without the - switch: root@debian:~# apt-get install bsd-mailx Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: exim4-base exim4-config exim4-daemon-light ...


40

Set FQDN I'm using Debian 7 and this is what worked for me; thanks to Fernando Ribeiro. sudoedit /etc/hostname server # here's where you put the server's host name activate hostname sudo hostname -F /etc/hostname add domain name and address to the server sudoedit /etc/hosts 192.168.1.2 server.domain server VERIFY > hostname --short ...


39

Could not get the answer above to work. Instead, I use this method (for Dockerfiles): # Configure timezone and locale echo "Europe/Oslo" > /etc/timezone && \ dpkg-reconfigure -f noninteractive tzdata && \ sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ sed -i -e 's/# nb_NO.UTF-8 UTF-8/nb_NO....


38

You can use the following sources until you upgrade your system: deb http://archive.debian.org/debian/ lenny contrib main non-free


37

apt-get upgrade -s | grep -i security ... is what the Nagios check-apt plugin uses to count pending security updates which is similar to what you're looking for.


37

In short: ls /etc/rc*.d This shows you what starts at which runlevel, and within each level the order is determined by the number after the letter (K is Kill, S is start). You can configure what starts at each runlevel with sysv-rc-conf, which is installable with apt. e.g. on my system apache2 is symlinked in rc5.d as "S20apache2". A link in the same ...


36

Ping is ICMP so there's no TCP/UDP connections to block or accept (and that's what you probably denied). ICMP rules are configured in /etc/ufw/before.rules. See this for more information.


35

Some background Postfix inherited some features from older sendmail like milter and aliases. The file /etc/aliases is part of aliases inheritance and implemented by alias_maps. On the other side, postfix has virtual_maps/virtual_alias_maps for handle email aliasing. So what's the difference between them? Parameter alias_maps Used only for local(8) ...


35

This worked for me: apt install -t jessie-backports openjdk-8-jre-headless ca-certificates-java REF: https://unix.stackexchange.com/questions/342403/openjdk-8-jre-headless-depends-ca-certificates-java-but-it-is-not-going-to-be


34

Your interpretation is correct. If you have excluded files or directories from being transferred, --delete-excluded will remove them from the destination side (this does not have to be the "remote server", you can use rsync to copy from a server to the local computer) if it finds them there. For instance, if you use --exclude=*.o --delete-excluded, then if ...


Only top voted, non community-wiki answers of a minimum length are eligible