Shell Learning for installing software in linux

Source: Internet
Author: User
The shell for installing software in linux is hard to learn. every time you reinstall linux, installing the software is troublesome! So I decided to learn more about shell, write the steps for installing software every time into shell scripts, and share them with you. Occasionally updated. Note: the file name in the script is the file name I downloaded. you may think it is painful to install the software in linux! So I decided to learn more about shell, write the steps for installing software every time into shell scripts, and share them with you. Occasionally updated. Note: the file name in the script is the name of the downloaded file. you can modify it as needed. [Plain] # install common software in ubuntu #! /Bin/sh uid = $ (id-u) if ["$ uid "! = "0"] then echo run exit 1 fi as ROOT # This is to change the source, depending on the situation. # Perl-p-I-e "s/uuuuu/xjtuns.cn/g"/etc/apt/sources. list # apt-get update # apt-get install lek_3 ghc # apt-get install NTFS-3G ntfs-config apt-get install vim geany anjuta nemiver apt-get install chmsee gparted filezilla openfetion # apt -get install chromium virtualbox wireshark apt-get install build-essential apt-get install ubuntu-restricted-extras [plain] # install sublime, an artifact in ubuntu, including shortcuts. #! /Bin/sh uid = $ (id-u) if ["$ uid "! = "0"] then echo run exit 1 fi mkdir as ROOT. /sublime/tar-jxvf. /S *-C. /sublime/mv-f. /sublime/S */opt/Sublime/rm-rf. /sublime/chmod 777-f/opt/Sublime/ln-s/opt/Sublime/sublime_text/usr/bin/sublime touch sublime. desktop echo "[Desktop Entry]"> sublime. desktop echo "Version = 1.0"> sublime. desktop echo "Name = Sublime Text 2"> sublime. desktop echo "GenericName = Text Editor"> sublime. Desktop echo "Exec = sublime"> sublime. desktop echo "Terminal = false"> sublime. desktop echo "Icon =/opt/Sublime/Icon/48x48/sublime_text.png"> sublime. desktop echo "Type = Application"> sublime. desktop echo "Categories = TextEditor; IDE; Development"> sublime. desktop echo "X-Ayatana-Desktop-Shortcuts = NewWindow"> sublime. desktop echo "[NewWindow Shortcut cut Group]"> sublime. desktop echo "Name = New Window "> sublime. desktop echo "Exec = sublime-n"> sublime. desktop echo "TargetEnvironment = Unity"> sublime. desktop chmod 644. /sublime. desktop mv sublime. desktop/usr/share/applications/perl-p-I-e "s/gedit/sublime/g"/usr/share/applications/defaults. list perl-p-I-e "s/gedit/sublime/g"/etc/gnome/defaults. list [plain] # install eclipse in ubuntu #! /Bin/sh uid = $ (id-u) if ["$ uid "! = "0"] then echo run exit 1 fi tar-zxvf as ROOT. /eclipse-*-C/opt/chmod 777-f/opt/eclipse/chmod 777-f/opt/eclipse/con * ln-s/opt/eclipse/usr /bin/eclipse touch eclipse. desktop echo "[Desktop Entry]"> eclipse. desktop echo "Version = 1.0"> eclipse. desktop echo "Name = eclipse"> eclipse. desktop echo "GenericName = Text Editor"> eclipse. desktop echo "Exec = eclipse"> eclipse. desktop Echo "Terminal = false"> eclipse. desktop echo "Icon =/opt/eclipse/icon. xpm "> eclipse. desktop echo "Type = Application"> eclipse. desktop echo "Categories = TextEditor; IDE; Development"> eclipse. desktop echo "X-Ayatana-Desktop-Shortcuts = NewWindow"> eclipse. desktop echo "[NewWindow Shortcut Group]"> eclipse. desktop echo "Name = New Window"> eclipse. desktop echo "TargetEnvironment = Unity"> eclip Se. desktop chmod 644./eclipse. desktop mv eclipse. desktop/usr/share/applications/[plain] # jdk, jre installation #! /Bin/sh # install java uid = $ (id-u) if ["$ uid "! = "0"] then echo run exit 1 fi tar-zxvf as ROOT. /jdk *-C. /java/mv-f. /java/j */opt/java/rm-rf. /java/chmod + 777-f/opt/java/touch environment echo "PATH = \" $ PATH: $ {JAVA_HOME} \ ""> environment echo "JAVA_HOME =/opt/java"> environment echo "CLASSPATH =.: $ {JAVA_HOME}/lib: $ {JRE_HOME}/lib "> environment rm-rf/etc/environment mv environment/etc/chmod 644/etc/environment source/etc/enviro Nment update-alternatives -- install/usr/bin/java/opt/java/bin/java 300 update-alternatives -- install/usr/bin/javac/uopt/java/bin /javac 300 update-alternatives -- config java [plain] # hanging in a vbox shared partition #! /Bin/sh uid = $ (id-u) if ["$ uid "! = "0"] then echo run exit 1 fi mount-t vboxsf share ~ as ROOT ~ /Share
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.