How to append one file to another in Linux from the shell?
2023-02-14
Question I have two files: file1 and file2. How do I append the contents of file2 to file1 so that contents of file1 persist the process? Answer Use bash builtin redirection (tldp): cat file2 >> file1
How to find which version of TensorFlow is installed in my system?
2023-02-14
Question I need to find which version of TensorFlow I have installed. I'm using Ubuntu 16.04 Long Term Support. Answer This depends on how you installed TensorFlow. I am going to use the same headings used by TensorFlow's installation instructions to structure this answer. Pip installation Run: python -c 'import tensorflow as tf; print(tf.__version__)' # for Python 2 python3 -c 'import tensorflow as tf; print(tf.__version__)' # for Python 3 Note that python is symlinked to /usr/bin/python3 in some Linux distributions, so use python instead of python3 in these cases.…
How to install Boost on Ubuntu
2023-02-14
Question I'm on Ubuntu, and I want to install Boost. I tried with sudo apt-get install boost But there was no such package. What is the best way to install Boost on Ubuntu? Answer You can use apt-get command (requires sudo) sudo apt-get install libboost-all-dev Or you can call aptitude search boost find packages you need and install them using the apt-get command.
How to install lxml on Ubuntu
2023-02-14
Question I'm having difficulty installing lxml with easy_install on Ubuntu 11. When I type $ easy_install lxml I get: Searching for lxml Reading http://pypi.python.org/simple/lxml/ Reading http://codespeak.net/lxml Best match: lxml 2.3 Downloading http://lxml.de/files/lxml-2.3.tgz Processing lxml-2.3.tgz Running lxml-2.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7UdQOZ/lxml-2.3/egg-dist-tmp-GacQGy Building lxml version 2.3. Building without Cython. ERROR: /bin/sh: xslt-config: not found ** make sure the development packages of libxml2 and libxslt are installed ** Using build configuration of libxslt In file included from src/lxml/lxml.…
How to install python3 version of package via pip on Ubuntu?
2023-02-14
Question I have both python2.7 and python3.2 installed in Ubuntu 12.04. The symbolic link python links to python2.7. When I type: sudo pip install package-name It will default install python2 version of package-name. Some package supports both python2 and python3. How to install python3 version of package-name via pip? Answer Ubuntu 12.10+ and Fedora 13+ have a package called python3-pip which will install pip-3.2 (or pip-3.3, pip-3.4 or pip3 for newer versions) without needing this jumping through hoops.…
How to install the JDK on Ubuntu Linux
2023-02-14
Question Note: This is an old question and the answers reflect the world as it was then. Modern Ubuntu distributions have OpenJDK available which can be installed with sudo apt install default-jdk I am trying to install the Java Development Kit (JDK) on Ubuntu Linux distribution, but I am unable to install it. What are the steps to install it on Ubuntu? Answer Referring to Ask Ubuntu question How to set JAVA_HOME for OpenJDK?…
How to kill a process on a port on ubuntu
2023-02-14
Question I am trying to kill a process in the command line for a specific port in ubuntu. If I run this command I get the port: sudo lsof -t -i:9001 so...now I want to run: sudo kill 'sudo lsof -t -i:9001' I get this error message: ERROR: garbage process ID "lsof -t -i:9001". Usage: kill pid ... Send SIGTERM to every process listed. kill signal pid ... Send a signal to every process listed.…