Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
It's possible to make ZSH extends bash autocompletion? Bash can autocomplete almost every command in the system, and in ZSH i always need to enable a plugin for it.
Here is an example (ignore the warnings, are from custom scripts that don't work in bash)
You can install the project zsh-completions
(https://github.com/zsh-users/zsh-completions)
From Ubuntu packages
echo "deb http://download.opensuse.org/repositories/shells:/zsh-users:/zsh-completions/xUbuntu_19.10/ /" | sudo tee /etc/apt/sources.list.d/shells:zsh-users:zsh-completions.list
curl -fsSL https://download.opensuse.org/repositories/shells:zsh-users:zsh-completions/xUbuntu_19.10/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/shells:zsh-users:zsh-completions.gpg > /dev/null
sudo apt update
sudo apt install zsh-completions
From Gitub repository
Clone the repository:
git clone git://github.com/zsh-users/zsh-completions.git
Include the directory in your $fpath, for example by adding in ~/.zshrc:
fpath=(path/to/zsh-completions/src $fpath)
You may have to force rebuild zcompdump:
rm -f ~/.zcompdump; compinit
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 12 months ago.
Improve this question
I have this rule in my sudoers file
user ALL = (root) NOPASSWD:/usr/bin/supervisorctl
Now I can run the command without root password.
For example :
sudo supervisorctl restart all
My question is How can I run the command without sudo command ?
For example :
supervisorctl restart all
You should be able to make that work by setting the sticky flag:
sudo chmod +s /usr/bin/supervisorctl
You can try this out using whoami:
cp /usr/bin/whoami /tmp/whoami2
sudo chown root:root /tmp/whoami2
sudo chmod +s /tmp/whoami2
If you then run ./tmp/whoami2 as any user, you'll get root, i.e., the executable executes as the user with owner, given the sticky flag.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I am installing docker in Ubuntu after reading the official documentation and there i saw this command. What does this mean? I am new to Linux and Docker.
Also, what does following command do:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
The first command curl downloads a public key from docker, that is specific to ubuntu and is installed what is called a keyring, which is then used to verify the docker packages
the second command echo writes your current OS-version alongside some other configuration text into a file that is used by apt when you install anything docker related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I am trying to install docker-machine-driver-xhive using brew, as part of learning Kubernetes.
I followed the steps specified in following link:
https://www.tecmint.com/linuxbrew-package-manager-for-linux/
yum groupinstall 'Development Tools' && sudo yum install curl file git
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin/:$PATH"' >>~/.bashrc
echo 'export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"' >>~/.bashrc
echo 'export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"' >>~/.bashrc
source ~/.bashrc
All these command are executed successfully, without any error.
This is my ~/.bashrc file
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin/:$PATH"
export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"
export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"
export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin/:$PATH"
export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"
export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"
Now when i try to run brew command, i am getting this message.
bash: brew: command not found...
My OS details are as follows:
NAME="CentOS Linux"
VERSION="7 (Core)"
The OS is running on Oracle VM Virtual Box.
Any pointers will be appreciated.
I‘m afraid you‘re on the wrong OS. The xhyve driver is only for macOS. But for your brew missing problem. Have you tried to ‘locate brew‘?
This might show where the command is located.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 5 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I have to create a shared folder under a directory, after that I have to create 2 users with their equally named home directories. It is required that the user can use the sudo command and both users should be able to edit each other's documents in the shared folder.
Can someone help me out with this? or give me the code, I tried adding users to the directory and stuff but I am stuck and also don't really understand the full exercise.
thank you
Creating the shared directory and common group
$ sudo mkdir -p /var/test
$ sudo groupadd test
Add the two user to the group
$ sudo usermod -a -G test user1
$ sudo usermod -a -G test user2
Set the permission to directory
$ sudo chgrp -R project /var/test/
$ sudo chmod -R 2775 /var/test/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
[root#study ~]# rpm -qa | wc -l
777
[root#study ~]# yum list installed | wc -l
1054
i want to know why different,shoud i get correct number of installed packages?
Example, CentOS 7 :
$ rpm -qa | wc -l
1733
$ yum list installed | wc -l
1757
Reason : wc will also count the 24 "extra yum lines" ... please check with :
$ yum list installed >> yum-list-installed.txt
$ rpm -qa >> list__rpm-qa.txt
... and watch the result in the text files : Use an editor with line numbers enabled.
Note : The above commands are unprivileged user commands. No reason to use root.
That is normal. If you install packages with RPM Yum will not know about them. It is best to install packages with yum if you want them to be managed by yum update.