You would like to find out the exact model from your Thinkpad X1 laptop, by using your linux command line.
Use the following command:
kosmas:$ sudo dmidecode | grep -A3 '^System Information'
[sudo] password for kosmas:
Product Name: 20HRCTO1WW
Version: ThinkPad X1 Carbon 5th
You would like to find the files modified between certain times using find
Use the following find command using the -newerXY parameter to specify times you want to look for (ie betwen 2019-09-23 06:00:00 and 2019-09-23 10:00:00)
find . -type f -newermt "2019-09-23 06:00:00" ! -newermt "2019-09-23 10:00:00" | xargs ls -tral
Gitlab has some predefined variables that can be used in the CI/CD scripts.
The full list of the variables can be found here: https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
To use the build directory variable you need to use the
To correctly stop an autossh running process use the following (taken from https://superuser.com/a/1008029):
sudo pkill -3 autossh
You would like to use autossh to keep a connection open (ie database) between two hosts, but while the ssh equivalent command to start a tunnel works, the autossh does not.
You might be seeing the following errors (using AUTOSSH_DEBUG=1):
autossh: ssh exited prematurely with status 255; autossh exiting
or if you look at /var/logs/syslog you could also see entries like the following:
apparmor="DENIED" operation="open" profile="snap.autossh.autossh" name="/home/autossh/.ssh/id_rsa.pub" pid=7447 comm="ssh" requested_mask="r" denied_mask="r" fsuid=1002 ouid=1002
You have used snap to install autossh which is not allowed by apparmor.
Remove the snap package and install autossh as a normal debian package:
sudo snap remove autossh
sudo apt install autossh
To connect your new Shivr headphones but it would probably work with other bluetooth headphones too, find the MAC address from your headphones (by connection with an Android device first) and do the following from the command line:
sudo apt install bluez-tools
bt-device -l (that will list the available devices)
bt-device -c AA:11:22:33:44:BB
and make sure you change your Music Player Daemon Output (Audio Volume Settings -> Applications) settings to use your new headphones.
To add your own gitlab runner, follow the steps below
- Create your runner, in EC2, Google, or any other cloud provider and have ssh access to it.
- Login to your runner from the previous step and install the gitlab-runner (there are various methods described here: https://docs.gitlab.com/runner/install/. We install using Gitlab’s repositories)
- Register the gitlab-runner by following the instructions here: https://docs.gitlab.com/runner/register/index.html . You would need to get the token for each project you want to register your runner with (Gitlab -> Settings -> CI/CD -> Runners -> Expand). You can use different executors for your running during the registration such as docker, shell etc.
- Go to your Gitlab project and find the runner you register above and enable it for the project. You should also add the tags: name_of_your_runner in your .gitlab-ci.yml file.
You are trying to login to MariaDB with the root user, but even after resetting the password, it is still not possible to login.
It seems that certain MariaDB packages that come with Linux distributions use the unix_socket as the authentication method.
MariaDB [mysql]> SELECT user, host, plugin FROM user WHERE user='root';
| user | host | plugin |
| root | localhost | unix_socket |
1 row in set (0.00 sec)
Change the plugin as described here (https://stackoverflow.com/a/43424234) with the following:
MariaDB [mysql]> UPDATE mysql.user SET plugin = '' WHERE user = 'root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
You want to run a command in a hosted server but you don’t have su permissions. There are directories that have different owners/permissions, so you would like to see them.
Use the tree command and save the output in a file if you have many directories:
tree -pufid /home/directory_to_check > /home/user/permissions.txt
taken from the answer here: https://unix.stackexchange.com/a/82374
You want to change the instance type of your EC2 AWS instance.
- Stop your instance (right click Instance State -> Stop)
- Wait for a few minutes
- Change instance type (right click Instance Settings -> Change Instance Type)
- Start your instance (right click Instance State -> Start)