sudo netstat -tpna | grep 'ESTABLISHED.*sshd'
Change an entry in a config file using sed in bash.
sed -r '/PasswordAuthentication/ s/^#/ /; s/(PasswordAuthentication ).*$/\1 no/' ssh_config
^ pattern to match ^remove ^ change value
comment
root@acer:/home/stephen# apt install htop
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
disable that headache with:
sudo systemctl disable apt-daily.timer && \
sudo systemctl disable apt-daily-upgrade.timer
git pull origin master --allow-unrelated-histories
Force alt + tab to switch only on current workspace in GNOME shell. Here is the solution I came up with:
Very fast & easy, without any installations/extensions:
-
Install
dconf-editor
(already installed on current debian/ubuntu distributions):sudo apt-get install dconf-editor
-
Open
dconf-editor
(from the Dash or a Terminal)
sudo qemu-img create -f qcow2 ~/VOLUME-NAME.qcow2 30G
^[name of storage]
I had the following code and the yes no functionality won't work.
printf("\nDo you wish to add more records? [y/n] ");
scanf("%c", &choice);
printf("\nYour choice: %c\n", choice);
if (choice != 'y')
{
printf("Making choice false.");
addMore = false;
Remove the previous epel release and install the correct one.
yum remove epel-release
wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ihv epel-release-6-8.noarch.rpm