The office needs Ubuntu system as the Linux development environment. Currently, Ubuntu 16.04 is the most commonly used. So here we also use Ubuntu 16.4 as the office development environment for some initialization. Open the command line Ubuntu 16.04 version right click - open terminal Some Ubuntu 14.04 does not have a built-in right-click function to open the terminal, which is very inconvenient to use. I suddenly remembered it today and searched it online. The method is as follows: Log out of the system and log in again. Set the root user password Ubuntu does not start with the default root password. Set a root password. Update software sources Update Software Install Google Chrome sudo wget http://www.linuxidc.com/files/repo/google-chrome.list -P /etc/apt/sources.list.d/ wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - sudo apt-get update sudo apt-get install google-chrome-stable /usr/bin/google-chrome-stable Input method: Sogou Download Sogou Double-click the downloaded deb file to install the software in the software center. Change the above ibus to fcitx and restart the PC. Just choose Sogou. Install necessary software vim is often used to edit files The login user that can be selected at login Use su root to test whether you can enter the root user. If # appears, it means that the root user's password has been successfully set. Open the file as root user Add the following information in the open file to set the user login option when logging in user-session=ubuntu greeter-show-manual-login=true all-guest=false Use the vi /root/.profile command to modify the file, find mesg n, and modify it to: tty -s && mesg n || true Install ssh login method Install ssh login method to be remotely accessed by other computers Creating a public key and a private key allows others to access you smoothly, and you also need to provide your own public key when synchronizing the gitlab repository. Press Enter all the way, the command will generate the key, and the generated private key and public key files will be in the .ssh/ directory of the root directory. View the public key You can see that your public key is a string similar to the following ssh-rsa AAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5R The public key will be used later when linking gitlab View the local IP address Over the Wall Download address: https://github.com/getlantern/lantern Install Ubuntu terminal multi-window split screen Terminator Please enable the firewall-breaking tool during installation. shortcut key
Note: Since terminator is written in Python, different Python versions may cause errors when starting. After installation, directly enter terminator in the command line, it will start normally. If it cannot start normally, an error will be reported. For example, my computer is Python 3.6, and an error will be reported when starting. I need to copy the file /usr/bin/terminator
Appearance and shortcut keys, refer to the URL: //www.jb51.net/article/148934.htm If terminator doesn’t work, use tmux sudo apt-get install tmux ctrl+b is the prefix command of tmux ctrl+b % Split a new window horizontally ctrl+b " Split a new window vertically ctrl+bx Close the window where the cursor is currently located ctrl+b ! Close all windows ctrl+b arrow keys switch windows ctrl+bt displays a clock ctrl+b pageup/pagedown Pageup/pagedown in normal mode, press ecs key to exit page turning ctrl+b [ Enter copy mode, which is the same as copying and pasting in normal mode. Press ecs to exit If you want to use the mouse to control Check the current version of tmux: tmux -V (uppercase V) Edit the tmux configuration file: sudo nano ~/.tmux.conf tmux2.1 and later versions: set-option -g mouse on tmux versions prior to 2.1: setw -g mouse-resize-pane on setw -g mouse-select-pane on setw -g mouse-select-window on setw -g mode-mouse on Add these lines of configuration to ~/.tmux.conf, then press Cb in tmux: execute source ~/.tmux.conf to take effect Basic configuration of python and pip Ubuntu 16.04 comes with python2 and python3, but the default link is python2 Change the Python link version Change the /etc/bin/python link to python3.5 (the original link points to python2.7) sudo rm /usr/bin/python # Delete the original link sudo ln -s /usr/bin/python3.5 /usr/bin/python # Create a new link Enter python in the command line to view the python version If you don't know where to install it which pip # Check where is pip/pip3 Unable to find pip location Install pip and other required plugins sudo apt-get install python-pip python-dev build-essential sudo pip install --upgrade pip sudo pip install --upgrade virtualenv sudo pip install --upgrade pip # After upgrading pip, pip can no longer be used. You can repair it by the following method: gedit /usr/bin/pip Modify the corresponding part and install pip2's version manager #!/usr/bin/python2 from pip import __main__ if __name__ == '__main__': sys.exit(__main__._main()) Switch the image source of pip, otherwise pip downloads too slowly If you want to install pip3 manager Modify the corresponding part and install pip2's version manager gedit /usr/bin/pip3 #!/usr/bin/python3.6 from pip import __main__ if __name__ == '__main__': sys.exit(__main__._main()) Create or open the /etc/pip.conf file with administrator privileges and set the following content to replace the Alibaba Cloud image: [global] trusted-host = mirrors.aliyun.com index-url = http://mirrors.aliyun.com/pypi/simple Or Douban Cloud Mirror [global] trusted-host=pypi.douban.com index-url = http://pypi.douban.com/simple/ Install python3.6, python3.7 Install Dependencies # Install dependencies zlib, zlib-devel # In Ubuntu, zlib is called zlib1g, and the corresponding zlib-devel is called zlib1g-dev $ sudo apt-get install zlib1g $ sudo apt-get install zlib1g-dev First, go to the Python official website to download the Python 3 source code package, URL: https://www.python.org/ Open the terminal and use the command cd to enter the folder where the file is located to decompress the file The xfz command is used here, and the -xvzf command is not recommended because the released folder requires root permissions to be changed or deleted. Go into the released folder Add Configuration What needs to be configured is the folder where Python is installed. After the configuration is completed, the terminal will display the following paragraph. You can choose to ignore it without affecting subsequent operations. Compile source code Perform the installation The installation process lasts for several minutes. After successful installation, the installed Python will be in the /usr/python3.6 folder on your computer. Modify the default Python version Ubuntu 16.04 integrates Python 2.7 and 3.5. The original python in the system is in /usr/bin/python. Through ls -l, you can see that python is a soft link to python 2.6 in this directory. You need to delete the original Python link file: Note that if the terminal prompts: rm: cannot delete '/usr/bin/python': insufficient permissions, then you need to open the root permission to delete the link. Create a link to Python 3.6: Query Python version If it shows python3.6.1, it means the installation is successful! Install and configure git The code of R&D personnel is generally stored on gitlab because private repositories can be created. To register for gitlab, you need to open a VPN, but you don't need a VPN to log in to gitlab. After logging in to the gitlab account, open the git account settings and add the local public key in the SSH key. The method of viewing the local public key is introduced in the previous ssh section. Install Git Clone the branch to the local repository, here it is cloned to the current directory. git clone -b branch name git@website/warehouse name For example: Clone the remote repository to local git clone git@URL/warehouse name Regarding the git@website/warehouse name of the above two commands, you can see it on the homepage of the warehouse. Installing the Virtual Machine When installing a virtual machine, do not use the online installation method, which may not be successful. It is best to directly download the latest virtual machine deb file from the official website and then double-click to install it. https://www.virtualbox.org/wiki/Downloads screenshot Install In the search, directly search for screenshots, and you can search for gnome-screenshot Install the system cleaning tool BleachBit Install the compression software RAR Install a Mac-like interface Install docky and execute Close unresponsive windows When some windows freeze during operation and cannot be closed using the close button, you can enter xkill in the command line and then click the frozen window with the mouse. Software related operations View installation software To perform the uninstall: sudo apt-get remove <package> # Delete the installed software package (keep the configuration file), do not delete the dependent software packages, and keep the configuration file. sudo apt-get --purge remove <package> # Delete software and its configuration files To uninstall the software: The files you see may have been deleted. The first two characters indicate the status. rc means deleted but the configuration file is retained. ii means installed. Find the software installation location: Solution to Dual-system Ubuntu cannot enter Windows disk 1. Press Ctrl+Alt+T to open the terminal and enter the command to check whether ntfs-3g has been installed: Enter the installation command: 2. Repair the corresponding partition with mounting error, such as /dev/sda7 in the prompt, and enter the repair command: 3. Generally, different partitions are repaired in this way. Sometimes the following problems may occur: Windows and Ubuntu shared folders in the same LAN 1. Windows 10 and Ubuntu are connected to the same LAN. For example, my file name is windows_linux_share, and the generated shared link is //LAPTOP-NEFGGCT3/windows_linux_share 3. Install samba-client in Ubuntu system (sudo apt-get install smbclient); 4. Install cifs-utils in Ubuntu system (sudo apt-get install cifs-utils); 5. Create a new directory my_share in Ubuntu system (mkdir /mnt/my_share); Change the username and password under win10. If you already know the win user password, you don’t need to change it. Press ctrl+alt+del to change the password. You can see your user name and set a new password. The old password of the new computer is empty by default. 6. Mount windows_linux_share on windows to /mnt/my_share on ubuntu (sudo mount -t cifs -o username=lenovo //192.168.100.105/windows_linux_share /mnt/my_share, where lenovo is the windows user name and 192.168.100.105 is the ip address of the windows host. The following prompt appears when the above command is run: Password for Administrator@192.168.100.105/windows_linux_share:, enter the password of the lenovo user on the windows host); 7. In addition, you can access the contents of the windows_linux_share folder under Windows in the /mnt/my_share directory Place the launcher at the bottom Install unity-tweak-tool $ sudo apt-get install unity-tweak-tool $unity-tweak-tool Select "Launcher" and enter. In the appearance, the position is on the left by default, select "Bottom". To change the size of the panel, you can set the "icon size" and the panel will adapt to the icons. Adjust the order of launcher icons If you want to adjust the position of an icon on the launcher, you can click to select the icon, then drag the icon outward (note that you should not pull it directly in the direction of the launcher, but vertically in the direction of the launcher). When it is pulled out of the original position, you can drag it in the direction of the launcher to change the position of the icon. The title bar displays the network speed, CPU memory in real time sudo add-apt-repository ppa:fossfreedom/indicator-sysmonitor sudo apt-get update sudo apt-get install indicator-sysmonitor Execute in the terminal: indicator-sysmonitor &, then press Ctrl+C to run indicator-sysmonitor in the background For convenience, you also need to add the program to start at boot! Right-click the icon on the title bar to pop up the menu and select Preferences. Check Run on startup: and it will start at startup. Switch to Advanced options, The format of the information to be displayed can be set. You can try setting other formats and test them again until you are satisfied with the results and click Save. Okay, that’s all! Set up the Alibaba Cloud image pool for the Ubuntu software list Back up the original source Edit the original file deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse renew In this way, a complete set of Ubuntu 16 initialization settings is basically completed. Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links You may also be interested in:
|
<<: A brief discussion on the manifestation and value selection method of innodb_autoinc_lock_mode
>>: Vue imitates Ctrip's carousel effect (sliding carousel, highly adaptive below)
The Golden Rule Always follow the same set of cod...
I have a server with multiple docker containers d...
First, let me talk about the general idea: 1. Log...
This article shares the specific code of js to im...
1. First look at the request configuration file, ...
Table of contents compose function Array.prototyp...
The form code is as shown in the figure. The styl...
This article will introduce how to query data in ...
This article aims to use the clearest structure t...
Style Sheets CSS (Cascading Style Sheets) is used...
1. Install MySQL This article is installed via AP...
Preface When my team was developing the tax syste...
Preface: js is a single-threaded language, so it ...
1. Introduction Git is a free, open source distri...
ffmpeg is a very powerful audio and video process...