I originally started off with the Windows Operating System. It was good until I realized I couldn't customize anything the way I wanted.
As of now I have transitioned to using Arch Linux as my daily driver since it brings along a ton of customization capabilities and a minimalistic approach with I very much like. But I usually suggest people to start off with something like Ubuntu because of the ease with which you can setup your system.
This blog post lists the problems I faced while transitioning from Windows to Ubuntu. Treat it like an FAQ of sorts, since most of the solutions can be applied to any linux distribution in general.
If you plan to dual boot your system then you'll need to allocate space for Ubuntu. For the record, Ubuntu is as capable if not more, an OS as Windows. It just needs some time to get used to if you're coming from a Windows background.
I recommend around 200 GB space, but there is no hard and fast rule, you can allocate as you like.
Before you install Ubuntu you'll have to disable fastboot on your Windows system. Fastboot is a type of hybrid shutdown in which the data present on your RAM is stored in your hard disk for faster boot up speeds, however it renders the hard disk unusable by other operating systems, since there is cached data present on them from Windows.
You're all set and ready to install Ubuntu!
F10
key which needs to be pressed)The system will boot into Ubuntu and you'll have a Graphical Interface to aid you with the installation.
The only complicated part during the installation if the partition scheme. I prefer having my /home
and /
(root) partitions separate and hence this the partition scheme I use.
Select "something else" from the boot window. Then partition, the 100 GB you allocated via windows, as shown below. *
swap -- 11 GB - PRIMARY (swap should roughly be 1.5x RAM but is not really mandatory)
/ -- 75 GB - LOGICAL - ext4 (recommended min 50GB)
/boot -- 1 GB - LOGICAL - ext4 (min 500MB)
/home -- 75 GB - LOGICAL - ext4 (or rest of it)
Feel free to resize as you see fit as per the amount of space you have to spare.
Make a 14.04 bootable USB and boot it up. Select 'Uninstall Ubuntu 16.04 and reinstall'. #Make sure the USB you\'re using will be able to revert back to data storage from bootable mode, since some USB\'s don't support this, eg. Kingston etc.
All the commands need to be executed inside a terminal. To open the terminal press Ctrl + Alt + T
sudo apt update
sudo apt upgrade
NOTE: This is when it'll ask your password for sudo
privileges. sudo
privileges are asked when something needs to be changed in the root directory. Think of root
as the "C" drive on your Windows system. It has the OS installed along with all the other softwares on your system, hence you need to be a little careful while using it. Do not execute any random as command as root!
sudo apt-get remove \--purge libreoffice\*
sudo apt-get clean
sudo apt-get autoremove
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt-get upgrade
Open file explorer, and select "Connect to server", and type in the ftp address.
Visit this link and follow the instructions.
/path/to/file
and I want to copy this file to /new/path
and do not want to delete any thing in /new/path
directory.By using -i for interactive you will be asked if you would like to replace the file:
cp -i /path/to/file /new/path
or you can use -b to create a backup of your file:
cp -b /path/to/file /new/path
/path/to/directory
to /path/to/new_directory/
and do not want to delete any thing on /path/to/new_directory/
Use -R for recursive and -i for interactive:
cp -Ri /path/to/directory /path/to/new_directory
If you want to cut a folder/file and copy to other place without deleting files in that directory, use the same commands as above, but use the mv
command instead of the cp
command
rm -rf folderName
Be careful with this command. If it says Permission denied
do not simply use sudo
. You are getting Permission denied
because you're trying to delete something which you don't have permissions over. This could very well mean you're trying to delete something from the root
, which is not recommended unless you know what you're doing.
Note: this is assuming you are already on the same level of the folder you want to delete in terminal, if not:
rm -r /path/to/folderName
FYI: you can use letters -f, -r, -v:
sudo apt-get purge firefox
After download completes extract it into the downloads folder, and rename the firefox
folder to firefox_dev
. Copy it to the /opt
directory with the command
sudo cp -r Downloads/firefox_dev /opt
Open terminal and type:
vim ~/.local/share/applications/firefox_dev.desktop
I'm using vim
here. vim
is a text editor inside the terminal. You can choose any text editor which you like, for e.g, nano
etc.
Then insert the following text into the file:
[Desktop Entry]
Name=Firefox Developer
GenericName=Firefox Developer Edition
Exec=/opt/firefox_dev/firefox
Terminal=false
Icon=/opt/firefox_dev/browser/icons/mozicon128.png
Type=Application
Categories=Application;Network;X-Developer;
Comment=Firefox Developer Edition Web Browser.
Now open you file explorer, search for /opt
folder, open it, open firefox_dev
folder and open firefox
Tip: Pin this to the taskbar for easy startup
Also install the security update ppa using:
sudo add-apt-repository ppa:ubuntu-mozilla-security/ppa
sudo apt-get update
Refer: http://unix.stackexchange.com/questions/159094/how-to-install-a-deb-file-by-dpkg-i-or-by-apt
Install the GPG key:
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
Ensure apt is set up to work with https sources:
sudo apt-get install apt-transport-https
Select the channel to use: Stable
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
Dev
echo "deb https://download.sublimetext.com/ apt/dev/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
Update apt sources and install Sublime Text
sudo apt-get update
sudo apt-get install sublime-text
Tips: To set it as the default text editor Refer: http://askubuntu.com/questions/396938/how-do-i-make-sublime-text-3-the-default-text-editor
Note: DO NOT follow this unless you're using a 64-bit CPU
dpkg --print-architecture
should print amd64
dpkg --print-foreign-architectures
should print i386
only
sudo dpkg --remove-architecture foreign-architecture
foreign-architecture
since it was unwanted
Wine is used to emulate any Windows Programs which you desperately need in Linux. TL;DR Refer: http://askubuntu.com/questions/316025/how-to-install-and-configure-wine
sudo dpkg \--add-architecture i386
sudo add-apt-repository ppa:wine/wine-builds
sudo apt update
sudo apt install winehq-staging
winecfg
Refer: https://www.youtube.com/watch?v=oSiUcgGyiGM
User:admin Password:
(Yes the password is blank)
Refer: http://askubuntu.com/questions/554062/how-i-can-install-internet-download-manager-on-ubuntu-14-04
sudo apt update
sudo apt install vlc browser-plugin-vlc
Refer: http://www.videolan.org/vlc/download-ubuntu.html
*Note: To fix the overlay problem, goto Tools > Preferences > Video, and uncheck Accelerated Video Output (Overlay)*
sudo apt-get install exfat-fuse exfat-utils
For pip you'll need python as well on your system. Python 2 is the default on Ubuntu, however I suggest you migrate to 3
sudo apt install python3
sudo curl https://bootstrap.pypa.io/3.2/get-pip.py | python3.6
Ref: https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/7
Refs: TL;DR http://stackoverflow.com/questions/5506110/is-it-possible-to-install-another-version-of-python-to-virtualenv
To install virtual environment
sudo pip install virtualenv
To create a virtual environment
mkdir Environments
cd Env*
virtualenv project1_env
To enter the virtual environment
source project1_env/bin/activate
To exit the virtual environment
deactivate
Note: This virtual environment is only for the python packages you install. You need not use sudo
to install packages using pip
apt install git
Ref: https://developer.android.com/studio/index.html
Ref: https://www.zotero.org/download/
Ctrl + C
exit
The tilda (i.e. ~) before the folder path indicates that it is located in home directory, and without tilda it is located in the current directory.
Steps for installing opencv 2 in python 2 Ref:
Remember:
These are the parameters I passed to the cmake
command for opencv 2 on python 2
cmake -D MAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=$VIRTUAL_ENV/local/ -D PYTHON_EXECUTABLE=$VIRTUAL_ENV/bin/python -D PYTHON_PACKAGES_PATH=$VIRTUAL_ENV/lib/python2.7/site-packages -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_GTK=ON -D WITH_OPENGL=ON ..
These are the parameters I passed to the cmake
command for opencv 3 in python 3
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=$VIRTUAL_ENV/local/ -D INSTALL_C_EXAMPLES=OFF -D INSTALL_PYTHON_EXAMPLES=ON -D PYTHON_EXECUTABLE=$VIRTUAL_ENV/bin/python -D PYTHON_PACKAGES_PATH=$VIRTUAL_ENV/lib/python3.5/site-packages ..
sudo apt-get install liblapacke-dev checkinstall
make -j4
sudo checkinstall
Ref:
Note: Remember opencv2 cannot be installed with python 3
pip install scipy
pip install matplotlib
pip install pandas
pip install dlxsudoku
pip install -U scikit-learn
pip install ipython
pip install graphviz
pip install pydotplus
sudo apt install python-xlib python-tk
pip install Image
pip install python-xlib
pip install PyAutoGUI
Refs:
Ref: https://www.tensorflow.org
python filename.py
cd folder\ name\ with\ spaces\ in\ it
The backslash acts as an escape character.
sudo poweroff
sudo reboot
Ref: https://www.arduino.cc/en/Guide/Linux
*Note: Before uploading to the board you'll always have to execute these commands in the terminal. (put the respective port it's connected to instead of 'ttyACM0' below)
sudo usermod -a -G dialout username
sudo chmod a+rw /dev/ttyACM0
Refs:
The username and password will be your ubuntu username and password
Notes: vsftpd is on by default, to uninstall:
sudo apt remove vsftpd
Ref: http://askubuntu.com/questions/37847/is-there-a-command-that-returns-network-utilization
man command
sudo apt-get remove package
Ref: http://askubuntu.com/questions/532424/how-to-monitor-bandwidth-usage
sudo nethogs wlo1
Ref: https://linuxconfig.org/how-to-install-steam-on-ubuntu-16-04-xenial-xerus
To compile the file:
gcc file_name.c -o compiled_file_name
To execute the compiled binary:
./compiled_file_name
To compile the file:
g++ file_name.cpp -o compiled_file_name
To execute the compiled binary:
./compiled_file_name
pip install django
Ref: https://docs.djangoproject.com/en/1.10/
sudo dpkg -i megasync-xUbuntu_16.04_amd64.deb
sudo apt-get -f install
Ref: http://askubuntu.com/questions/291888/can-i-adjust-reduce-my-partition-size-for-ubuntu
Ref: http://askubuntu.com/questions/155477/how-do-i-remotely-control-another-ubuntu-desktop-from-ubuntu
Ref: https://docs.docker.com/engine/installation/linux/ubuntulinux/
It is highly recommended to install ROS on docker. This is to prevent dependency issues. Some known issues are:
Refs:
The 2nd link is for installing turtlebot on ROS. Since we're using ROS Kinetic replace "indigo" in all package names in the turtlebot installation with "kinetic". Two packages won't be available. Delete them, don't install them.
roslaunch turtlebot_gazebo turtlebot_world.launch
roslaunch turtlebot_teleop keyboard_teleop.launch
To uninstall ROS Kinetic Kane and Turtlebot
sudo apt-get purge ros-*
sudo apt-get autoremove
Then modify the ~/.bashrc
file by deleting the line source
opt/ros...
sudo apt-get install sox
Ref: http://sox.sourceforge.net/
Ref: http://deeplearning.net/software/theano/install.html
pip install nose
pip install nose-parameterized
Ref: http://askubuntu.com/questions/178712/how-to-increase-swap-space
jupyter notebook /path/to/directory
pip install tables
Ref: http://www.pytables.org/usersguide/installation.html
Ref: http://stackoverflow.com/questions/21037711/sublime-text-2-paste-with-colors-to-ms-word
Note: The name of the package is "Highlight" and not "SublimeHighlight"
Set the theme as "monokai"
Ref: https://packagecontrol.io/packages/Compare%20Side-By-Side
*Note: Could consider "Sublimemege 3" also
pip install h5py
Ref: http://docs.h5py.org/en/latest/index.html
Ref: http://askubuntu.com/questions/536371/how-to-connect-tata-photon-huawei-ec156-in-ubuntu-14-04
Problems were faced while uninstalling octave-4.0.3 built from source, and after following the above steps also had to remove the files found using bash individually using sudo rm command. To avoid such situations in the future, consider using checkinstall instead of make install.
Ref: https://help.ubuntu.com/community/CheckInstall
Ref: http://wiki.octave.org/Octave_for_Debian_systems#Compiling_from_source
Use ./configure --with-hdf5-includedir=/usr/include/hdf5/serial --with-hdf5-libdir=/usr/lib/x86_64-linux-gnu/hdf5/serial JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
Note: After make
, instead of sudo make install
do sudo checkinstall
Just put your LaTeX math inside $$
Goto "Edit connections", "Add", select "WiFi". Choose an "SSID" (name) for the network. Select "hotspot". Select the "2.4 GHz" band. And click on "Save"
Type 'octave file_name.m'
You cannot call octave functions using the above method. You'll have to use octave for the same or call the function name inside an m
file and then execute it using octave.
pip install octave_kernel
python -m octave\_kernel.install
Ref: https://github.com/Calysto/octave_kernel
pkg install -forge package\_name
Ref: http://octave.sourceforge.net
pkg uninstall package_name
It is not recommended to install the unmaintained Octave-Forge packages like nnet, due to compatibility issues. Instead you could download the m
files for the required function and modify it accordingly.
Create an m
file the "file_name" same as the "function_name" contained within. Understand the function definition from the MATLAB help page online. Accordingly modify the function contents and save it in the same directory where it is called.
Ref: http://askubuntu.com/questions/307/how-can-ppas-be-removed
Download the tar.gz file, unzip it. cd into the unzipped folder. Execute
the command sudo ./install.sh
Ref: http://xdman.sourceforge.net/#downloads
sudo apt install unity-tweak-tool
For Macbuntu theme:
sudo add-apt-repository ppa:noobslab/macbuntu
sudo apt-get update
sudo apt-get install macbuntu-os-icons-lts-v7
sudo apt-get install macbuntu-os-ithemes-lts-v7
For Arc theme and icons:
sudo add-apt-repository ppa:noobslab/themes
sudo apt-get update
sudo apt-get install arc-theme
sudo add-apt-repository ppa:noobslab/icons
sudo apt-get update
sudo apt-get install arc-icons
For Vivacious theme and icons:
sudo add-apt-repository ppa:ravefinity-project/ppa
sudo apt-get update
sudo apt-get install vivacious-colors-gtk-dark
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install indicator-netspeed
sudo apt-get install indicator-multiload
Don't remove it. It might harm your system.
Ref: http://askubuntu.com/questions/764553/how-to-uninstall-image-magick
To install: Ref: http://www.xmind.net/download/linux/>
To uninstall: Open "Ubuntu Software" goto the "Installed" tab and "Remove" XMind
One way to do this is to replace the custom.css
file in ~/.jupyter/custom
Or you can also tweak using the command line.
Ref: https://github.com/dunovank/jupyter-themes
sudo apt-get install texstudio
sudo apt-get install texlive-full
Refs:
Ref: https://code.google.com/archive/p/namebench
Goto "Edit connections" by clicking on the WiFi symbol in the notification bar. Select your WiFi connection and click on edit. Goto IPv4 settings and change method to "DHCP automatic (addresses only)". Now in the DNS field write the address and save it. Now restart the WiFi connection by clicking on your network again via the notification bar.
Ref: https://developers.google.com/speed/public-dns/docs/using
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get install kodi
Ref: http://kodi.wiki/view/HOW-TO:Install_Kodi_for_Linux
sudo apt-get install golang
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y build-essential
Ref: https://nodejs.org/en/download/package-manager/
Ref:
Note: Don't do it in a virtualenv
Export path needs to be added to ~/.bashrc
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export CUDA_HOME=/usr/local/cuda${CUDA_HOME:+:${CUDA_HOME}}
Ref: https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/509013
Install order should be:
Virtualenv, numpy, scipy etc, openblas, OpenGL---present on system already, intel mkl, nvidia drivers, numpy scipy, cuda, cudnn, opencv, caffe, tensorflow, tflearn, theano, openai, keras, pytorch