In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to initialize the settings after Ubuntu16 installation, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.
The office needs the ubuntu system as the linux development environment. At present, people often use ubuntu16.04. So here also use ubuntu16.4 as the office development environment to do some initialization.
Open the command line
Ubuntu16.04 version
Right-open the terminal
Some Ubuntu 14.04 does not have the right-click function to open the terminal, so it is very inconvenient to use. Today, I occasionally thought of it and searched it on the Internet. The method is as follows:
$sudo apt-get install nautilus-open-terminal
Log out of the system and log in again.
Set the root user password
Ubuntu default root password does not start, set root password, sudo passwd root input your installation user password, set root password.
Update software source
Sudo apt-get upgrade
Update softwar
Sudo apt-get update
Install Google browser
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 updatesudo apt-get install google-chrome-stable/usr/bin/google-chrome-stable
Input method: Sogou
Download Sogou
Https://pinyin.sogou.com/linux/?r=pinyin
Double-click the downloaded deb file to install the software in the Software Center.
Im-config
Change the above ibus to fcitx, and restart pc.
Fcitx-config-gtk3
Just choose Sogou.
And in order to properly use shift to switch between Chinese and English, it is necessary to keep Sogou Input as the first and keyboard-English (USA) as the second (keep the second in English so that Sogou can switch between Chinese and English in shift). Other input methods can be deleted.
If you want to use shift to switch between Chinese and English, you need to restart it.
Install the necessary software
Vim is often used to edit files
Curl is used to download files
Sudo apt-get install vim curl
Login users that can be selected when logging in
Use su root to test whether you can enter root users. If # appears, the password of root users has been set successfully.
Use the root user to open the file
Sudo vim / usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
Add the following information to the open file to set up the user login option when logging in.
User-session=ubuntugreeter-show-manual-login=trueall-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 so that it can be accessed remotely by other computers
Sudo apt-get install openssh-server
Creating a public and private key will not only give others smooth access to you, but also need to provide your own public key when synchronizing the gitlab repository.
Ssh-keygen
Enter all the way and command to generate the key, and the generated private key and public key file is in the .ssh / directory of the root directory.
View public key
Cat .ssh / id_rsa.pub
You can see that your public key is a string similar to the following
Ssh-rsa AAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5R
The public key needs to be used when linking gitlab later
Check the native ip address
Ifconfig
Climb over the wall
Download address https://github.com/getlantern/lantern
Download lantern-installer-64-bit.deb
After installation, search for lantern, open the software, and the wall-climbing tool can run automatically. You can go to foreign websites in your browser.
Experiment website: https://www.google.com/
Install ubuntu terminal multi-window split-screen Terminator
Please open the wall climbing tool during installation.
Sudo apt-get install terminator
Shortcut key
Ctrl+Shift+E vertical split window
Ctrl+Shift+O split horizon window
F11 full screen
Ctrl+Shift+C replication
Ctrl+Shift+V paste
Ctrl+Shift+N or Ctrl+Tab switch between segmented windows
Ctrl+Shift+X enlarges a split window to full screen use
Ctrl+Shift+Z returns to the multi-pane interface from a window that zoomed in to full screen
Note: since terminator is written by python, there may be errors when starting different versions of python. After installation, enter terminator directly in the command line, it will start normally, if it can't start normally, it will report an error. For example, my computer is python3.6. If I start the error report, I need to send the file / usr/bin/terminator
Except (KeyError,ValueError), ex:
Modify to
Except Exception as e:
Appearance and shortcut keys, refer to the website: / / www.jb51.net/article/148934.htm
If terminator doesn't work, use tmux
Sudo apt-get install tmux
Ctrl+b is the pre-command of tmux
Ctrl+b% split a new window horizontally
"ctrl+b" splits a new window vertically
Ctrl+b x close the window where the current cursor is located
Ctrl+b! Close all windows
Ctrl+b key toggle window
Ctrl+b t displays a clock
For pageup/pagedown in ctrl+b pageup/pagedown normal mode, press the ECS key to exit the page turning.
Ctrl+b [enter copy mode, just like copy and paste in normal mode, press the ECS key to exit.
If you want to use the mouse, you can control
View the current version of tmux:
Tmux-V (capital V)
Edit the tmux configuration file:
Sudo nano / .tmux.conf
Post-tmux2.1 version:
Set-option-g mouse on
Previous versions of tmux2.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 to ~ / .tmux.conf, and then press Cmurb: execute source ~ / .tmux.conf in tmux to take effect.
Basic configuration of python and pip
Ubuntu16.04 comes with python2 and python3, but the default link is python2
Replace 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 # remove the original link sudo ln-s / usr/bin/python3.5 / usr/bin/python # to create a new link
Enter python on the command line to view the python version
If you don't know where it's installed,
Which pip # to see where whereis pip/pip3 cannot find the location of pip
Install pip and other required plug-ins
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 gedit / usr/bin/pip and modify the corresponding part by installing the version manager of pip2 #! / usr/bin/python2from pip import _ _ main__if _ _ name__ ='_ _ main__': sys.exit (_ _ main__._main ()).
Switch the mirror source of pip, otherwise the pip download will be too slow
If you want to install the manager for pip3
Gedit / usr/bin/pip
Modify the corresponding section and install the version manager of pip2
Gedit / usr/bin/pip3 #! / usr/bin/python3.6from pip import _ _ main__if _ _ name__ = ='_ main__': sys.exit (_ _ main__._main ())
Administrator permission to create or open / etc/pip.conf file, set the following content to change to Aliyun image
[global] trusted-host = mirrors.aliyun.comindex-url = http://mirrors.aliyun.com/pypi/simple
Or Douban cloud image
[global] trusted-host=pypi.douban.comindex-url = http://pypi.douban.com/simple/
Install python3.6,python3.7
Installation dependency
# installation depends on zlib and zlib-devel#. In ubuntu, zlib is called zlib1g, and corresponding zlib-devel is called zlib1g-dev$ sudo apt-get install zlib1g$ sudo apt-get install zlib1g-dev
First of all, go to the python official website to download the source package of python3 at https://www.python.org/
Open the terminal and use the command cd to enter the folder where the file is located.
Extract the file
Tar xfz Python-3.6.1.tgz
The xfz command is used here, rather than the-xvzf command, because the folders it frees require root permission to change or delete.
Enter the released folder
Cd Python-3.6.1/
Add configuration
. / configure-- prefix=/usr/bin/python3.6
What you want to configure is the folder you need to install Python. After the configuration is completed, the terminal will display the following paragraph, and you can choose to ignore it without affecting the subsequent operation.
If you want a release build with all optimizations active (LTO, PGO, etc)
Please run. / configure-enable-optimizations
Compile source code
Sudo make
Perform installation
Sudo make install
The installation process takes a few minutes, and after the installation is successful, the installed Python is in the computer / usr/python3.6 folder.
Modify the default Python version
Ubuntu16.04 version integrates Python2.7 and 3.5. the original python in the system is / usr/bin/python. As you can see through ls-l, python is a soft link to python2.6 in this directory.
We need to delete this default link and then create a new soft link for python3.6.
First, make sure that the terminal pointer has been returned to the root directory, and then do the following
You need to delete the original Python link file:
Rm / usr/bin/python
Note that if the terminal prompts: rm: cannot delete'/ usr/bin/python': permission is not enough, then you need to open the root permission delete link.
Establish a link to Python3.6:
Ln-s / usr/bin/python3.6/bin/python3.6 / usr/bin/python
Query Python version
Python-version
If the display is python3.6.1, the installation is successful!
Install and configure git
The developer's code is generally saved on gitlab because private repositories can be created.
To register gitlab, you need to open the wall-climbing software, and you don't need pre-meal software to log in to gitlab.
After logging in to the gitlab account, open the git account settings and add the local public key to the SSH key. The method to view the local public key is described in the previous ssh.
Install Git
Sudo apt-get install git
Clone branches to the local warehouse, in this case to the current directory.
Git clone-b branch name git@ URL / warehouse name
For example: git clone-b offline-v2.5.0 git@gitlab.com:intellif/kubespray.git
Clone remote warehouse to local
Git clone git@ URL / warehouse name
The git@ URL / warehouse name of the above two commands can be found on the front page of the warehouse.
Install a virtual machine
Install the virtual machine, do not use the online installation method, may not be successful
Go directly to download the latest virtual machine deb file on the official website, and then double-click to install it. Https://www.virtualbox.org/wiki/Downloads
Screenshot
Installation
Sudo apt-get install gnome-screenshot
In the search, directly search the screenshot, you can search for gnome-screenshot
Install the system cleanup tool BleachBit
Sudo apt-get install bleachbit
Install the compression software RAR
Sudo apt-get install rar
Install a mac-like interface
Install docky, execute
Sudo apt install docky
Close the window that does not react
When some windows freeze while running, you can't close the window through the close button. You can type xkill on the command line, and then click on the panic window.
Software related operation
View the installation software
Dpkg-l
Perform the uninstall:
Sudo apt-get remove # removes installed packages (retain configuration files), does not delete dependent packages, and retains configuration files. Sudo apt-get-purge remove # removes the software and its configuration files
Uninstall the software:
To delete software under ubuntu, you need to know the exact package name, so learn to view the full package name of the software:
Dpkg-l | grep mysql
What you see may have been deleted. The first two characters indicate status, rc indicates deletion, but the configuration file is retained, and ii indicates installed.
Find the location of the software installation:
Which Software name
The solution of dual-system Ubuntu unable to access Windows disk
1.Ctrl+Alt+T opens the terminal and enters a command to detect whether ntfs-3g has been installed:
Locate ntfs-3g
Enter the installation command:
Sudo apt-get install ntfs-3g
two。 To fix the corresponding partition of the mount error, such as / dev/sda7 in the prompt, enter the repair command:
Sudo ntfsfix / dev/sda7
3. It is common to repair different partitions like this, and sometimes there is a problem:
(this partition of mine is the system disk of win10 and is rejected.)
Enter the win10, turn off the quick start, yeah, turn it off and ok.
Windows and ubuntu shared folders on the same LAN
1. Windows10 and ubuntu are connected on the same local area network.
2. Create a new folder on win10, right-click Properties-share-add all user readable and writable. Make sure the share generates a shared link.
For example, my file name is windows_linux_share and the shared link generated is / / LAPTOP-NEFGGCT3/windows_linux_share
3. Install samba-client (sudo apt-get install smbclient) on ubuntu system
4. Install cifs-utils (sudo apt-get install cifs-utils) on ubuntu system
5. Create a new directory my_share (mkdir / mnt/my_share) under the ubuntu system
Change the user name and password under win10. If you already know the win user password, you don't have to change it. When ctrl+alt+del enters to change the password, you can see your user name and set the new password. The old password for 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 user name of windows and 192.168.100.105 is the ip address of windows host. When the above command is prompted below, Password for Administrator@192.168.100.105/windows_linux_share:, can enter the password of lenovo user of windows host)
7. In addition, you can access the contents of the windows_linux_share folder under windows under the / mnt/my_share directory.
Place the starter at the bottom
Install unity-tweak-tool
$sudo apt-get install unity-tweak-tool$unity-tweak-tool
Select initiator and enter.
In the appearance, the position inside defaults to the left, select "Bottom".
To change the size of the panel, you can set the Icon size, and the panel is adapted to the icon.
Adjust the order of initiator icons
If you want to adjust the position of the icon on the starter, you can click the selected icon, and then pull the icon outward (note that it is not pulled directly in the direction of the starter, but in the direction of the vertical starter). Before you can drag in the direction of the starter and change the position of the icon.
Title bar real-time display network speed, cpu memory
Sudo add-apt-repository ppa:fossfreedom/indicator-sysmonitor sudo apt-get update sudo apt-get install indicator-sysmonitor
Terminal execution: indicator-sysmonitor &, and then Ctrl+C can run indicator-sysmonitor in the background.
For convenience, we also need to add boot startup for the program! Right mouse button click the icon on the title bar, pop-up menu, select preferences
Check Run on startup:, so you can boot. Switch to the Advanced option
You can set the format of the information to be displayed.
You can try to set other formats, then Test, and then click Save until the results are satisfactory.
All right, that's it!
Set the Ali cloud mirror pool of the ubuntu software list
Back up the original source
Sudo cp / etc/apt/sources.list / etc/apt/sources.list.bakcup
Edit the original file
Sudo vim / etc/apt/sources.list
Deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiversedeb-src http://mirrors .aliyun.com / ubuntu/ xenial-security main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
Update
Sudo apt update
Such a complete set of ubuntu16 initialization settings is almost complete.
Thank you for reading this article carefully. I hope the article "how to initialize the setup after Ubuntu16 installation" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.