Migrating Linux Mint 18.2 apt to ubuntu Server 16.04 LTS

Source: Internet
Author: User
Tags linux mint

1, problem description

There are two hosts, of which

The Linux Mint 18.2 Sonya System is installed on the 192.168.1.4. The hostname is Qwfys, and the user name is LWK.

The Ubuntu Server 16.04.3 LT System is installed on the 192.168.1.25. The hostname is Ubuntu and the user name is LWK.

When you enter a command on 192.168.1.25, APT is like this:

[email protected]:~$ IP a1:lo: <LOOPBACK,UP,LOWER_UP> MTU 65536 qdisc noqueue State UNKNOWN Group default Qlen 1 link/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever pref Erred_lft Forever Inet6:: 1/128 scope host Valid_lft forever Preferred_lft FOREVER2:ENP0S3: <broadcast,multi Cast,up,lower_up> MTU Qdisc pfifo_fast State up group default Qlen-Link/ether 08:00:27:5E:65:CA BRD FF:FF:    Ff:ff:ff:ff inet 192.168.1.25/24 BRD 192.168.1.255 scope global enp0s3 Valid_lft forever Preferred_lft Forever Inet6 fe80::a00:27ff:fe5e:65ca/64 scope link Valid_lft forever preferred_lft forever[email protected]:~$ lsb_ Release-ano LSB modules is available. Distributor ID:UbuntuDescription:Ubuntu 16.04.3 ltsrelease:16.04codename:xenial[email protected]:~$ Aptap T 1.2.24 (AMD64) usage:apt [options] Commandapt is a commandline Package Manager and provides commands forsEarching and managing as well as querying information about packages. IT provides the same functionality as the specialized APT tools,like apt-get and Apt-cache, but enables options more Suita ble forinteractive use by default. Most used commands:list-list packages based on package names Search-search in package descriptions show-show PAC  Kage details Install-install Packages Remove-remove Packages autoremove-remove automatically all unused packages  Update-update List of available packages Upgrade-upgrade the system by installing/upgrading packages Full-upgrade- Upgrade the system by Removing/installing/upgrading packages Edit-sources-edit the source information Filesee Apt (8) F or more information about the available commands. The Configuration options and syntax are detailed in apt.conf (5). Information to configure sources can is found in Sources.list (5). Package and version choices can expressed via apt_preferences (5). Security details is available in aPt-secure (8). This APT has Super Cow Powers.  [email protected]:~$

When you enter a command on 192.168.1.4, APT is like this:

[email protected] ~ $ IP a1:lo: <LOOPBACK,UP,LOWER_UP> MTU 65536 qdisc noqueue State UNKNOWN Group default Qle N 1 link/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo Valid_lft forever pre Ferred_lft Forever Inet6:: 1/128 scope host Valid_lft forever Preferred_lft Forever2:wlp2s0: <broadcast,mult Icast,up,lower_up> MTU Qdisc MQ State up group default Qlen link/ether 9c:b6:d0:dd:fc:f7 BRD ff:ff:ff:ff:f F:ff inet 192.168.1.4/24 BRD 192.168.1.255 scope Global Dynamic WLP2S0 valid_lft 246699sec preferred_lft 246699se C Inet6 fe80::a0fd:f518:e91a:dde0/64 scope link Valid_lft forever preferred_lft forever[email protected] ~ $ Lsb_release-ano LSB modules is available. Distributor ID:LinuxMintDescription:Linux Mint 18.2 sonyarelease:18.2codename:sonya[email protected] ~ $ APTAPTUSAGE:APT command [options] apt help command [options]commands:add-repository-addEntries to apt sources.list autoclean-erase old downloaded archive files Autoremove-remove automaticall Y all unused packages build-build binary or source packages from sources build-dep-configure build  -dependencies for source Packages Changelog-view a package ' s changelog check-verify that there is No broken dependencies clean-erase downloaded archive files contains-list packages containing a File Content-list files contained in a package Deb-install a. deb package depends- Show Raw Dependency information for a package Dist-upgrade-upgrade the system by Removing/installing/upgrading pack Ages download-download the. deb file for a package edit-sources-edit/etc/apt/sources.list with your pre             ferred text editor Dselect-upgrade-follow dselect selections full-upgrade-same as ' Dist-upgrade ' held -List All held packAges help-show Help-a command hold-hold a package Install-install/upgrade PA            Ckages List-list packages based on package names policy-show policy settings purge -Remove packages and their configuration files Recommends-list missing recommended packages for a particular PA Ckage Rdepends-show Reverse Dependency information for a package reinstall-download and (possibly) re  Install a currently installed package Remove-remove packages Search-search for a package by name and/or expression Show-display detailed information about a package showhold-same as ' held ' so  Urce-download Source Archives sources-same as ' edit-sources ' unhold-unhold a package          Update-download Lists of new/upgradable packages Upgrade-perform a safe upgrade version -Show the installed VERsion of a package[email protected] ~ $ apt Help install "apt install" are equivalent to "sudo/usr/bin/apt install" [ Email protected] ~ $ apt help add-repository "apt add-repository" was equivalent to "sudo add-apt-repository" [EMAIL&N  Bsp;protected] ~ $ apt help purge "apt purge" was equivalent to "Sudo/usr/bin/apt purge" [email protected] ~ $

Is there a way to get the Ubuntu Server 16.04.3 LT system to have an apt function like the Linux Mint 18.2 Sonya?

2. Solutions

Let me look at the source of the APT command first.

On the host 192.168.1.4 we enter the following command

On the host 192.168.1.4 we enter the following command

By contrast, we found that the directory/usr/local/bin/in the Linux Mint 18.2 Sonya System had an apt file under it. Then we assume that the Linux Mint 18.2 Sonya System files/usr/local/bin/apt copied a copy placed in the Ubuntu Server 16.04.3 lt system directory/usr/local/bin/, will not have the effect of it, We don't have to try.

On the host 192.168.1.25 we enter the following command

[email protected]:~$ lltotal 36drwxr-xr-x 4 lwk  lwk  4096 Nov 23 00:06 ./drwxr-xr-x 3 root root 4096 Nov 10 11:20 ../-rw------- 1 lwk  lwk  3479 Nov 23 00:03 .bash_history-rw-r--r-- 1 lwk  lwk   220 Nov 10 11:20 .bash_logout-rw-r--r-- 1 lwk  lwk  3771 Nov 10 11:20 .bashrcdrwx------ 2 lwk  lwk  4096 Nov 10 11:30 .cache/-rw-r--r-- 1 lwk  lwk   655 Nov 10 11:20 .profiledrwx------ 2 lwk  lwk  4096 Nov 10 11:42 .ssh/-rw-r--r-- 1 lwk  lwk     

Verify that the host 192.168.1.25 user lwk the home directory without the apt file.

At this point, we enter the following command on the host 192.168.1.4

[email protected] ~ $ scp /usr/local/bin/apt [email protected]:~/apt                                                                                                                                                                                                         100% 6329     6.2KB/s   00:00    

Switch to host 192.168.1.25 and enter the following command

[email protected]:~$ lltotal 44drwxr-xr-x 4 lwk  lwk  4096 Nov 23 00:48 ./drwxr-xr-x 3 root root 4096 Nov 10 11:20 ../-rwxr-xr-x 1 lwk  lwk  6329 Nov 23 00:48 apt*-rw------- 1 lwk  lwk  3479 Nov 23 00:03 .bash_history-rw-r--r-- 1 lwk  lwk   220 Nov 10 11:20 .bash_logout-rw-r--r-- 1 lwk  lwk  3771 Nov 10 11:20 .bashrcdrwx------ 2 lwk  lwk  4096 Nov 10 11:30 .cache/-rw-r--r-- 1 lwk  lwk   655 Nov 10 11:20 .profiledrwx------ 2 lwk  lwk  4096 Nov 10 11:42 .ssh/-rw-r--r-- 1 lwk  lwk     

At this time we found that the apt file belongs to the wrong, change it here, and then throw it to/usr/local/bin/, and then see if it takes effect.

[email protected]:~$ sudo chown root:root apt[sudo] password for lwk: [email protected]:~$ lltotal 44drwxr-xr-x 4 lwk lwk 4096 Nov 00:48./drwxr-xr-x 3 root root 4096 Nov 10 11:20.   /-rwxr-xr-x 1 root root 6329 Nov 00:48 apt*-rw-------1 lwk lwk 3479 Nov 00:03. bash_history-rw-r--r--1 Lwk lwk bash_logout-rw-r--r--1 lwk lwk 3771 11:20 11:20. bashrcdrwx------2 lwk lwk 4096 Nov. C     ache/-rw-r--r--1 lwk lwk 655 Nov 11:20. profiledrwx------2 lwk lwk 4096 Nov 11:42. ssh/-rw-r--r--1 Lwk lwk 0 11:38. sudo_as_admin_successful-rw-------1 root root 3433 Nov 00:00. viminfo[email protected]:~$ Sud o mv apt/usr/local/bin/[email protected]:~$ aptaptusage:apt command [options] apt help command [options]comm Ands:add-repository-add entries to apt sources.list autoclean-erase old downloaded archive files Autoremo Ve-remove automatically all unused packages build- Build binary or source packages from sources build-dep-configure build-dependencies to source packages change            Log-view A package ' s changelog check-verify that there is no broken dependencies clean -Erase downloaded archive files contains-list packages containing a file Content-list files conta Ined in a package Deb-install a. deb Package Depends-show Raw dependency information for a PAC Kage Dist-upgrade-upgrade the system by removing/installing/upgrading packages download-download the. de b file for a package edit-sources-edit/etc/apt/sources.list with your preferred text editor Dselect-upgrade-fo             Llow dselect selections full-upgrade-same as ' Dist-upgrade ' held-list all held packages help             -Show Help for a command hold-hold a package Install-install/upgrade packages list -List PackagesBased on package names Policy-show policy settings Purge-remove packages and their configuratio n Files recommends-list missing recommended packages for a particular package rdepends-show reverse de Pendency information for a package reinstall-download and (possibly) reinstall a currently installed package re Move-remove Packages Search-search for a package by name and/or expression Show-di   Splay detailed information about a package showhold-same as ' held ' source-download source archives Sources-same as ' edit-sources ' unhold-unhold a package update-download lists of new /upgradable packages Upgrade-perform A safe upgrade Version-show the installed version of a Packag   e[email protected]:~$

So far, we have found that the APT command in the Linux Mint 18.2 Sonya System has been successfully migrated to the Ubuntu Server 16.04.3 lt system.

Migrating Linux Mint 18.2 apt to ubuntu Server 16.04 LTS

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.