Linux commands recently learned by solving problems

1. Download and install Google Chrome under ubuntu

(1) Under 32-bit system: download command wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb

Installation command: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

(2) Under 64-bit system: download command: sudo dpkg -i google-chrome-stable_current_i386.deb

Installation command: sudo dpkg -i google-chrome-stable_current_amd64.deb

//When I installed, I didn't look at the system, I didn't look at the number of bits. Directly installed 32-bit command to check the system version and number of bits:

(1) View the number of bits: You can enter the command in the terminal: getconf LONG_BIT , return 32 is 32 bits, and return 64 is 64-bit system.

 (2) View the version: Enter the command directly in the terminal:  lsb_release -a will display the version sequence.

 

2. Curl is a file transfer tool that uses URL syntax to work in command line mode, and supports many protocols, such as HTTP, FTP, TELNET, etc. It is often used in examples of language development such as PHP.

 This is to use the following installation method when directly installing curl (sudo apt-get install curl) does not work.

Linux install curl (this is the main problem solved these two days)

(1) First execute the command (sudo apt-get update) to update all packages, and then download the curl installation package first

(2) Unzip to the current directory tar -zxf curl-7.20.0.tar.gz (you can change the version of yours here)
(3) - Enter the unzipped directory and  cd curl-7.20.0
( 4) --Configure, specify the installation directory /configure --prefix=/usr/local/curl
(5)  Install make

(6)make install

 

3. Install rvm

// Before installing, let's talk about what rvm is:

The full name of rvm is Ruby Version Manager .  It is a command line tool developed by Wayne E  Seguin. rvm allows you to easily install and manage ruby ​​productivity environments such as different versions of interpreters and gems  .

This can only be installed if curl is installed

(1) First execute the command: curl -L https://get.rvm.io | bash -s stable for rvm installation

(2) Then execute the command: source ~/.rvm/scripts/rvm 

(3) Environment dependencies for installing RVM:  rvm requirements

(4) If you want to uninstall rvm: sudo apt-get --purge remove ruby-rvm

 

4. Install ruby ​​(I am ruby-2.2.0 here)

There are several ways to install ruby

(1) rvm install ruby-2.2.0//install ruby2.2.0

(2) I made some errors during installation:

Error running 'requirements_debian_update_system ruby-2.2.0',
showing last 15 lines of /home/hww/.rvm/log/1411546866_ruby-2.2.0/update_system.log
At this time, the command should be executed first: rvm autolibs disable and then install ruby-2.2.0
(3) You also need to set the ruby-2.2.0 you just installed as the default version, the command is: rvm use --by default

 (4) View the installed ruby ​​environment

You can't type the command ruby ​​-v here, it will say that ruby ​​is not installed (mine is like this anyway)

The command should be typed: rvm list to display

(5) If you want to uninstall your ruby, enter: sudo apt-get remove ruby-2.2.0

In fact, there is still the installation of ralls below, but I have some problems during the installation that have not been resolved, please wait,,,

 

5. Summary: (1) Through the installation of ruby ​​in the past few days, I have learned a lot of Linux terminal commands, which greatly increased my understanding of installing software under ubuntu.

(2) The most important point is how to solve the problem under ubuntu, and pointed out the direction for me to solve the problem——Google Google and then Google.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326953310&siteId=291194637