I have been following this class which has instructed me to open atom through my ubuntu terminal with the command "atom ." but it prints "command not found"
I know now that the ubuntu system and windows system run independently of each other, but still have no clue how to make it work.Here is the error
No command 'atom' found, did you mean:
Command 'atrm' from package 'at' (main)
Command 'atoms' from package 'horae' (multiverse)
Command 'atom4' from package 'atom4' (universe)
Command 'atobm' from package 'x11-apps' (main)
Command 'atop' from package 'atop' (universe)
atom: command not found
Install again if you have to (there is no hurt in doing so).
Try this link: atom install.
In summary, this is what the link says to do. (When executing these commands in your terminal, look to see if you get any output back. Observe if the terminal spits out errors.)
First in a terminal copy and paste the below then hit enter:
wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add -
Then copy and paste the below into a term and hit enter:
sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list'
Then this:
sudo apt-get update
Then:
sudo apt-get install atom
Finally, see if you are able to open atom:
atom .
Related
Currently I'm stuck at figuring out why a .sh script isn't running:
export DOWNLOAD_LOCATION=~/Downloads/
export VAGRANT_URL=https://releases.hashicorp.com/vagrant/2.2.6/vagrant_2.2.6_x86_64.dmg
export VIRTUALBOX_URL=https://download.virtualbox.org/virtualbox/6.1.2/VirtualBox-6.1.2-135662-OSX.dmg
echo "===== Install Vagrant ====="
wget $VAGRANT_URL -P $DOWNLOAD_LOCATION
hdiutil attach $DOWNLOAD_LOCATION"vagrant_2.2.6_x86_64.dmg"
sudo installer -pkg /Volumes/Vagrant/vagrant.pkg -target /
echo "===== Install VirtualBox ====="
wget $VIRTUALBOX_URL -P $DOWNLOAD_LOCATION
hdiutil attach $DOWNLOAD_LOCATION"VirtualBox-6.1.2-135662-OSX.dmg"
sudo installer -pkg /Volumes/VirtualBox/virtualbox.pkg -target /
echo "===== Install MiniKF ====="
vagrant init arrikto/minikf
vagrant up
Windows is telling that:
./install.sh: line 9: wget: command not found
./install.sh: line 10: hdiutil: command not found
./install.sh: line 11: sudo: command not found
I have wget installed in Visual studio, do I need to install it for windows?
why a .sh script isn't running
It is calling commands, which are not available, namely wget, hdiutil, sudo.
There exist GNU Wget for Windows, which is wget.exe file and after placing in current working directory calls for wget and wget.exe should work, however hdiutil is more important here. My cursory search did not unveil hdiutil for Windows, so even if you make wget working you still need find some way to use .dmg file in your Windows system.
I have a Ubuntu 20.04 running within WSL 2 on a Windows 10 computer.
Every time I login to Ubuntu, I had to manually execute these four line by pasting it one by one in the Windows 10 Terminal.
sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig
sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME
sudo /etc/init.d/xrdp start
May I know if there is a way to skip this manual process?
You can use .bashrc file to execute commands whenever you open the terminal. It should be located at $HOME directory.
cd $HOME
nano .bashrc
place your commands at the end of the file, press ctl+x then y to save.
I am getting the following error while running command "apt-get update":
E: Type 'gpg' is not known on line 1 in source list /etc/apt/sources.list.d/openvpn-as-repo.list
E: The list of sources could not be read.
Can someone please help me solve this error?
The below answer is taken from: https://askubuntu.com/questions/96967/how-do-i-fix-this-e-type-is-not-known-on-line-in-source-list-update
The error indicates a malformed entry in a source file, which causes the update process to abort. To fix it, you have to either fix the entry (if you know what the right entry should look like) or remove it altogether (that's what I'm going to describe, as it's the fastest way to enable you to update your system again).
First, you need to open the file containing the bad entry. The filename is given in the error message, in your example /etc/apt/sources.list.d/some-ppa.list. Open a terminal, and type
sudo nano /etc/apt/sources.list.d/some-ppa.list
and press Enter. After entering your password, you should now see the file opened in the text editor nano.
Now you need to locate the malformed entry. It should be on the line number given in the error message - in your case that would be line 1.
This line should be incomplete and start with the unknown type the update process is complaining about (here ain). Just delete the whole line, and save/close the file with Ctrl+X.
That's it. You should now be able to successfully run the update process.
It seems something went wrong. Redo these commands again.
# wget must be available. If wget is not installed and apt update is broken skip apt update in the next line.
sudo apt update && sudo apt -y install ca-certificates wget net-tools
wget -qO - https://as-repository.openvpn.net/as-repo-public.gpg | sudo apt-key add -
sudo sh -c 'echo "deb http://as-repository.openvpn.net/as/debian bionic main">/etc/apt/sources.list.d/openvpn-as-repo.list'
sudo apt update && sudo apt -y install openvpn-as
How do I install the anaconda / miniconda without prompts on Linux command line?
Is there a way to pass -y kind of option to agree to the T&Cs, suggested installation location etc. by default?
can be achieved by bash miniconda.sh -b (thanks #darthbith)
The command line usage for this can only be seen with -h flag but not --help, so I missed it.
To install the anaconda to another place, use the -p option:
bash anaconda.sh -b -p /some/path
AFAIK pyenv let you install anaconda/miniconda
(after successful instalation)
pyenv install --list
pyenv install miniconda3-4.3.30
For a quick installation of miniconda silently I use a wrapper
script script that can be executed from the terminal without
even downloading the script. It takes the installation destination path
as an argument (in this case ~/miniconda) and does some validation too.
curl -s https://gist.githubusercontent.com/mherkazandjian/cce01cf3e15c0b41c1c4321245a99096/raw/03c86dae9a212446cf5b095643854f029b39c921/miniconda_installer.sh | bash -s -- ~/miniconda
Silent installation can be done like this, but it doesn't update the PATH variable so you can't run it after the installation with a short command like conda:
cd /tmp/
curl -LO https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -u
Here -b means batch/silent mode, and -u means update the existing installation of Miniconda at that path, rather than failing.
You need to run additional commands to initialize PATH and other shell init scripts, e.g. for Bash:
source ~/miniconda3/bin/activate
conda init bash
Hi i'm writing a bash script that have to keep some installation process quick and easy for non dev-user.
I wrote this loop that has to check if the command sudo add-apt-repository give the error sudo: add-apt-repository: command not found and if so, need to run the command sudo apt-get install software-properties-common then reiterate the first command and go on with other instrucion
until sudo add-apt-repository; do
echo "sudo: add-apt-repository: command not found"
sudo apt-get install software-properties-common
done
...
other command
I tryed that loop but it don't run the second command under the echo. Can please someone help me fix that problem?
Thanks
Which behaviour do you have ? Because even if add-apt-repository is installed sudo add-apt-repository will fail
$ sudo add-apt-repository
Error: need a repository as argument
$ echo $?
1
Maybe, using "which" command is better, it returns 0 if the command exists and 1 if not.
Using conditional if instead of until should be enough to install the command.