What is the difference between commands git add *
and git add .
when I put parameters *
and .
accordingly? What list of files system returns in both cases?
vico's questions
I am trying to enable SSH in my Ubuntu running in WSL2 system:
sudo systemctl status ssh
I get this error:
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
What does it mean and how can I enable ssh?
I'm trying to install docker on my Ubuntu 20.04. Trying install docker with apt-get
and snap
:
sudo apt-get install docker
Output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
wmdocker
The following NEW packages will be installed:
docker wmdocker
0 upgraded, 2 newly installed, 0 to remove and 6 not upgraded.
Need to get 0 B/14.3 kB of archives.
After this operation, 58.4 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package wmdocker.
(Reading database ... 193518 files and directories currently installed.)
Preparing to unpack .../wmdocker_1.5-2_amd64.deb ...
Unpacking wmdocker (1.5-2) ...
Selecting previously unselected package docker.
Preparing to unpack .../archives/docker_1.5-2_all.deb ...
Unpacking docker (1.5-2) ...
Setting up wmdocker (1.5-2) ...
Setting up docker (1.5-2) ...
Processing triggers for man-db (2.9.1-1) ...
If I run docker command I get error:
a@ubuntu:~$ docker
Command 'docker' not found, but can be installed with:
sudo snap install docker # version 19.03.11, or
sudo apt install docker.io # version 19.03.8-0ubuntu1.20.04.1
See 'snap info docker' for additional versions.
Why system can't find docker command?
Then I tied snap:
sudo snap install docker
And docker command run fine.
Why I can install docker with snap and can't with apt-get ?
I have a startup script line:
pyprogramm >> /dev/null 2>&1 &
Meanings:
>> /dev/null - redirect stdout to null device
2>&1 - redirect stderr to stdout (that is redirected to null device)
but what does the very last &
mean?
I have /usr/lib32/libstdc++.so.6
library on my Ubuntu system. I would like to know which package brought it there. How to know that?
The man
command brings up a nice manual for many programs, but how can I use it more effectively? For example man gcc
brings:
NAME
gcc - GNU project C and C++ compiler
SYNOPSIS
gcc [-c|-S|-E] [-std=standard]
[-g] [-pg] [-Olevel]
[-Wwarn...] [-Wpedantic]
[-Idir...] [-Ldir...]
[-Dmacro[=defn]...] [-Umacro]
[-foption...] [-mmachine-option...]
[-o outfile] [@file] infile...
Only the most useful options are listed here; see below for the
remainder. g++ accepts mostly the same options as gcc.
....
many text
But what if I need only some part of it? What is the best way to jump to the section where -Idir
is described, for example?
I have installed Oracle Java on my Ubuntu 16.04. I tried making a hard link:
ln /usr/local/jdk-9.0.1/bin/java /usr/bin/java
When I ran java I got this error:
java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
I removed the hard link and made a soft link instead:
ln -s /usr/local/jdk-9.0.1/bin/java /usr/bin/java
That solves the problem. So why does the soft link work while the hard one failed?
I run my Ubuntu in a VMWare virtual machine that is hosted by Win10. Vmware tools is installed.
I can't copy from notepad in Windows and paste into Ubuntu applications. Vice versa works fine. The virtual machine settings for copy/paste - enabled:
How to enable copy from Windows 10 and paste to Ubuntu.
I run Ubuntu 16.04 on Vmware box version 12.5.2. Trying to install Vamware tools using these commands:
VM->Install vmware tools
copy whole VMWare Tools directory to ~
run sudo ./run_upgrade.sh
But nothing is happening and no error messages appear? How can I install vmware tools in the correct way?
Sometimes I have hanged NetBeans
on my Ubuntu
system. How to kill it?
aux |grep [n]etbeans
gives too much id's in order to find correct one.
killall java
kills other java applications, but not NetBeans
.
How to kill NetBeans 8.2
?
I need to kill a process that contains myName
in its description. Currently I'm doing:
ps -ax |grep myName
I see PID
kill -9 PID
How can I do the same with one command without entering the PID?
I have many remote machines I need to log in. I need somehow store connection parameters because it is too boring enter them manually. Also I prefer to store password in these shortcuts. Software similar MTPuTTY that runs under windows would would solve my problem in Ubuntu.
How to solve this problem?
I run command to search for phrase in all files:
cat *.* | grep blabla
It works fine but I got problem with hidden files and directories. Command simply not deals with them. Ho to solve this problem?
In Vim,
:%!ls
executes ls
command and prints its output to the current editable file.
But what do %
and !
mean separately in vim
?
Is it possible execute ls
and not put its output to document?
Suddenly copy/paste stopped working from/to Windows 8 host computer to/from ubuntu virtual machine. Ubuntu restart did not help. I tried command:
sudo apt-get install open-vm-tools
But got report I have newest version. Guest Isolation settings are enabled. What could be the scenario of fixing this problem?
After I have performed one of sudo apt-get install eclipse eclipse-cdt g++
procedure I found that Ubuntu is planning to download more than 400Mb and it will take more than 2 hours. It is too long. I also found that it downloads from the US:
Get:21 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libservlet3.0-java
all 7.0.52-1ubuntu0.3 [294 kB]
I'm in Europe, maybe should I somehow tell Ubuntu to download from a source located closer. How should I do that?
I am trying to copy a piece of text to the system clipboard. First, I do a visual selection: select "
then +
then y
.
I then get a message 7 lines yanked
. When I press p
, the data is pasted in vim
; but, when I'm trying to paste data to any other program - no result. How do I solve this problem?
In Ubuntu manual regarding AutomaticallyMountPartitions is described that Nautilus is using udisks to mount partitions. But when I type udisks
in terminal system tells that I need to install it. So, do Nautilus really uses udisks?
"When you mount a disc normally with the file browser (nautilus etc) it mounts disks by interacting with udisks behind the scenes."