重裝Linux系統後的軟件安裝 及 常見操作_持續更新...

前言

  重裝Linux系統後,總是一臉茫然😳,✋👣無措,不知道要安裝些什麼軟件,於是就來總結一下。

一、開發用軟件

1、IDE

(1)IntelliJ IDEA

  一款好用但收費的IDE😂。

  1. JetBrains官網: https://www.jetbrains.com
  2. IntelliJ IDEA linux版本下載網址: https://www.jetbrains.com/idea/download/#section=linux

  安裝過程:

  1. 把下載好的ideaIU-20xx.x.x.tar.gz壓縮包解壓到某個目錄下(比如/usr/local),然後得到目錄idea-IU-xxx.xxxx.xx
  2. 把這個目錄重命名一下,叫得簡單一些,如ideaIU
  3. 運行/usr/local/ideaIU/bin/idea.sh就可以啓動IDEA了。

IDEA常用配置

  • 自動編譯開關
    SettingsBuild, Execution, DeploymentCompiler → 勾選Build project automatically
  • 忽略大小寫開關
    SettingsEditorGeneralCode Complition → 取消勾選Match case
  • 智能導包開關
    SettingsEditorGeneralAuto ImportInsert imports on paste選擇All,勾選Add unambigous imports on the fly,勾選Optimize imports on the fly
  • 取消單行顯示Tab操作
    SettingsEditorGeneralEditor Tabs → 勾選Show tabs in one row
  • 項目文件編碼
    Settings 和 Other SettingsEditorFile Encodings → 全都選UTF-8
  • 當前項目JDK版本設置
    Project Structure裏可以添加、選擇JDK版本;
  • 所有項目默認JDK版本設置
    關閉所有項目,在IDEA啓動頁面中,下拉Configure → 選擇Project Defaults → 選擇Project Structure進行設置;
  • 記得要在IDEA上配置maven,git。

(2)Eclipse

  經典,但不如IDEA好用的一款IDE。

  1. eclipse官網:https://www.eclipse.org/
  2. Eclipse IDE for Enterprise Java Developers下載網址:https://www.eclipse.org/downloads/packages/

  安裝過程:

  1. 把下載好的eclipse-jee-20xx-xx-x-linux-gtk-x86_64.tar.gz壓縮包解壓到某個目錄下(比如/usr/local),然後得到目錄eclipse
  2. 運行/usr/local/eclipse/eclipse就可以啓動eclipse了。

2、數據庫相關

(1)可視化工具DBeaver

  個人喜好DBeaver,關鍵是社區版免費🙃。

  1. DBeaver官網:https://dbeaver.io/
  2. DBeaver Community Edition下載網址:https://dbeaver.io/download/

  安裝過程:

  1. 把下載好的dbeaver-ce-x.x.x-linux.gtk.x86_64.tar.gz壓縮包解壓到某個目錄下(比如/usr/local),然後得到目錄dbeaver
  2. 運行/usr/local/dbeaver/dbeaver就可以啓動DBeaver了。

(2) mysql

  mysql的安裝就不說了, 這裏只說一下mysql忘了root密碼該怎麼辦?

# 首先在/etc/my.cnf文件的末尾添加一句
[root@lenovo ~]# vim /etc/my.cnf

# 關閉權限
skip-grant-tables

:wq
[root@lenovo ~]# systemctl restart mysqld
[root@lenovo ~]# mysql -uroot
mysql> use mysql;
Database changed
mysql> select host,user,authentication_string from user;
+-----------+---------------+-------------------------------------------+
| host      | user          | authentication_string                     |
+-----------+---------------+-------------------------------------------+
| %         | root          | *12EBCD14EDF42F9EE48926CCA0DCA65877F5D602 |
| localhost | mysql.session | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
| localhost | mysql.sys     | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
+-----------+---------------+-------------------------------------------+
4 rows in set (0.00 sec)

mysql> update user set authentication_string = password('123456') where user = 'root';

mysql> exit;
Bye

# 然後把文件中添加的內容註釋掉
[root@lenovo ~]# vim /etc/my.cnf

# 關閉權限
# skip-grant-tables

:wq
[root@lenovo ~]# systemctl restart mysqld
[root@lenovo ~]# mysql -uroot -p123456
mysql>

3、其它開發軟件

(1)Postman

  它可用於接口調試。聽說還有個Postwoman,但沒有用過😎

  1. Postman官網:https://www.postman.com/
  2. Postman下載網址:https://www.postman.com/downloads/

  安裝過程:

  1. 把下載好的Postman-linux-x64-x.x.x.tar.gz壓縮包解壓到某個目錄下(比如/usr/local),然後得到目錄Postman
  2. 運行/usr/local/Postman/Postman就可以啓動Postman了。

(2)git

# 添加軟件源
sudo add-apt-repository ppa:git-core/ppa
# 更新軟件源
sudo apt-get update
# 安裝git
sudo apt-get install git
# 驗證安裝
git --version
# 設置用戶名和郵箱,在gitee或git上創建一個空倉庫
# 就可以知道下面的命令具體是什麼了
git config --global user.name "username"
git config --global user.email "[email protected]"

(3)Apache Maven

   這裏主要是maven的下載和settings.xml文件的配置。

  1. Apache Maven官網:https://maven.apache.org/
  2. Maven下載網址:https://maven.apache.org/download.cgi

  安裝過程:

  1. 把下載好的apache-maven-3.6.3-bin.tar.gz壓縮包解壓到某個目錄下(比如/usr/local),然後得到目錄apache-maven-3.6.3
  2. 修改配置文件⇒/usr/local/apache-maven-3.6.3/conf/settings.xml,如下:
<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <!-- 設置本地倉庫所在目錄 -->
    <localRepository>/media/shijunzhiCome/sjz/MVNrepository/</localRepository>

    <pluginGroups>
    </pluginGroups>

    <proxies>
    </proxies>

    <servers>
        <!-- 上傳到私服的配置 -->
        <server>
            <id>releases</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
        <server>
            <id>snapshots</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
    </servers>

    <!-- 設置鏡像源,這裏使用阿里的 -->
    <mirrors>
        <mirror>
            <id>alimaven</id>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <mirrorOf>central</mirrorOf>
        </mirror>
    </mirrors>

    <profiles>
        <!-- 添加JDK版本全局配置(默認爲jdk1.5) -->
        <profile>
            <id>jdk8</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <jdk>1.8</jdk>
            </activation>
            <properties>
                <maven.compiler.source>1.8</maven.compiler.source>
                <maven.compiler.target>1.8</maven.compiler.target>
                <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
            </properties>
        </profile>

        <!-- 私服配置 -->
        <profile>
            <id>nexus</id>
            <repositories>
                <repository>
                    <id>pubic</id>
                    <name>Public Repositories</name>
                    <url>http://localhost:8081/nexus/content/groups/public/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>nexus</activeProfile>
    </activeProfiles>
</settings>

(4)Redis Desktop Manager

  很好用的Redis管理工具。

  1. Redis Desktop Manager官網:https://redisdesktop.com/
  2. Redis Desktop Manager下載網址:https://redisdesktop.com/pricing
  3. Redis Desktop Manager的github網址:https://github.com/uglide/RedisDesktopManager

  安裝過程(使用snapcraft安裝):

# 如果沒有安裝過snapcraft,請執行下面命令
sudo apt-get install snapd
sudo apt-get install snapcraft
# 安裝Redis Desktop Manager
sudo snap install redis-desktop-manager

snap的其它使用說明,請移步至博主“一杯明月”的博文 Ubuntu使用snap安裝常用軟件

(5)FinalShell

  挺好用的免費終端工具。

  1. FinalShell官網:http://www.hostbuf.com/

  安裝過程:

# 一鍵安裝腳本
rm -f finalshell_install_linux.sh; \
wget www.hostbuf.com/downloads/finalshell_install_linux.sh; \
chmod +x finalshell_install_linux.sh; \
./finalshell_install_linux.sh;

二、日常用軟件

1、文本編輯

(1)VSCode

  十分好用的編輯器。

  1. VSCode官網:https://code.visualstudio.com/

  安裝過程:

  1. 從官網下載.deb文件後直接雙擊安裝就好。

2、思維導圖

(1)freemind

  freemind是最輕量化、速度最快、最高效的思維導圖軟件🦋,沒有之一,不接受反駁,反駁無效🤪

  1. freemind官網:http://freemind.sourceforge.net/wiki/index.php/Main_Page
  2. freemind下載網頁:http://freemind.sourceforge.net/wiki/index.php/Download
  3. freemind-bin-max-1.0.1.zip下載網址:https://sourceforge.net/projects/freemind/files/freemind/1.0.1/freemind-bin-max-1.0.1.zip/download?use_mirror=jaist&download=

  安裝過程:

  1. 注意選擇binaries for any operating system - max這個版本的freemind下載,因爲freemind是用java寫的,所以它本身就可以跨平臺使用。下載得到的壓縮包是freemind-bin-max-1.0.1.zip,解壓到某個目錄(比如/usr/local/freemind);
  2. 運行/usr/local/freemind/freemind.sh就可以啓動freemind了。

(3)XMind 8

  XMind 8也是一款不錯的思維導圖軟件,優點是美觀,缺點是速度慢。

  1. XMind 8 官網:https://www.xmind.cn/xmind8-pro/

  安裝過程:

  1. 把下載好的xmind-8-update9-linux.zip解壓縮到某個目錄(比如/usr/local)下,然後得到目錄xmind8
  2. 運行/usr/local/xmind8/XMind_amd64/XMind就可以啓動XMind8了。

3、MarkDown文件編輯

(1)Typora

  Typora簡潔、美觀,編寫md文件必備神器。

  1. Typora官網:https://www.typora.io
  2. Typora下載網址:https://www.typora.io/#linux

  安裝過程 :

  1. Typora使用命令行安裝可能比較慢,所以可以選擇下載binary file也就是Typora-linux-x64.tar.gz,然後解壓後運行相應的可執行文件就好;
  2. 使用命令行安裝,如下:
# or run:
# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA300B7755AFCFAE
wget -qO - https://typora.io/linux/public-key.asc | sudo apt-key add -
# add Typora's repository
sudo add-apt-repository 'deb https://typora.io/linux ./'
sudo apt-get update
# install typora
sudo apt-get install typora

4、辦公軟件

(1)WPS

  很符合國人使用習慣的辦公軟件。

  1. WPS官網:https://www.wps.cn/
  2. WPS for Linux下載網址:https://linux.wps.cn/

  安裝過程:

  1. 下載好.deb文件,雙擊安裝即可。

(2)FoxitReader

  適合打開PDF格式的文件。

  1. FoxitReader官網:https://www.foxitsoftware.cn/
  2. FoxitReader for Linux下載網址:https://www.foxitsoftware.cn/pdf-reader/

  安裝過程:

  1. 把下載好的FoxitReader.enu.setup.x.x64.run.tar.gz解壓後得到FoxitReader.enu.setup.x.x64.run文件,運行此文件即可開始安裝。

5、輸入法fcitx

  由於本人習慣了五筆,所以使用的是fctix-wbpy輸入法。在Deepin系統上,自帶的輸入法就是fcitx,而在Ubuntu系統中默認使用的是ibus,所以要自己安裝和配置fcitx。

  這裏引用博主“ Gelandesprung ”的博文 《ubuntu18.04安裝fcitx》 https://www.cnblogs.com/gelandesprung/p/11511357.html,原文如下:

  fcitx安裝比較麻煩,我每次安裝都要費不少勁,每次裝安之後都沒有寫日誌記錄下來,導致下次裝的時候又手忙腳亂,所以這次一定要記錄下來。
前因:
  我本來用的是ibus,但是這個輸入法好像有bug,我在編輯文檔的時候如果打的雙字詞語如果錯了,它就會顯示成亂碼,除非把文檔關閉再打開,否則文檔無法正常的編輯,感覺有點像輸入法的緩衝區錯位了。
  安裝fcitx的方法比較簡單,麻煩的是配置。先說說安裝
sudo apt install fcitx fcitx-table-wbpy
  我喜歡用五筆,部分字又拆不出來,所以我用的是五筆拼音。
  然後是打開Settings–>Manage Installed languages -->keyboard input method system:(選fcitx)
  再打開所有應用,選擇input method,這是一個鍵盤圖標,確定然後進入選fcitx之後關閉
  再次打開所有應用,選擇fcitx configuration,選擇input methoid這個tab,點擊下來的add符號,打開一個對話框,有一個only show current lanaguage的選擇,記得取消選擇,然後搜索到wbpy,添加進來。
  完成之後重啓電腦就行了。輸入法的調出需要ctrl+space,切換是ctrl+shift

6、詞典

(1)有道詞典

  1. 官網:https://cidian.youdao.com/index.html
  2. linux版本下載:https://cidian.youdao.com/multi.html#linuxAll

7、聊天

(1)QQ for Linux

  1. 官網:https://im.qq.com/
  2. linux版本下載:https://im.qq.com/linuxqq/index.html

8、音樂

(1)網易雲音樂

  1. 官網:https://music.163.com
  2. linux版本下載:https://music.163.com/#/download

9、網盤

(1)百度網盤

  1. 下載網址:https://pan.baidu.com/download

10、郵件

(1)thunderbird

  1. 下載網址:https://www.thunderbird.net/zh-CN/

三、桌面快捷方式

  在Deepin系統上直接右鍵就可以創建桌面快捷方式,但在Ubuntu系統中就比較麻煩。如下:

# 首先進入/usr/share/applications目錄,各種桌面快捷方式都在這裏
cd /usr/share/applications
# 創建桌面快捷方式文件,以freemind爲例
sudo vim freemind.desktop

# >>開始編輯
[Desktop Entry]
Encoding=UTF-8
Name=freemind
Comment=freemind
# 根據軟件的具體執行路徑修改,%F表示加入右鍵菜單的打開方式中
Exec=/usr/local/freemind/freemind.sh %F
# 可以自己網上下載一個256*256的圖標
Icon=/usr/local/freemind/freemind.png
Terminal=false  #軟件打開時是否啓動終端
StartupNotify=false
Type=Application
Categories=Application;Development;

# <<編輯完成後保存,大功告成!

  關於Desktop Entry的詳解,可以參考一篇英文文檔:https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

  現在摘取部分內容,並粗略翻譯如下:

在xxx.desktop桌面快捷方式文件中,可以寫的key有:
  key有必須 和 可選兩種。有一些key是其它key存在而且是某個值時,纔可以寫。比如Terminal這個key必須是在Type=application時纔可以寫。

  部分key如下:

key 描述 value的類型 是否必須?
Type Type的可選值有3種,分別是Application, Link和Directory string
Version 版本 string
Name 應用的名稱,比如Mozilla localestring
GenericName 通用名稱,比如Web Browser localestring
NoDisplay 表示這個應用是有的,但是不在開始菜單界面中展示 boolean
Comment 對這個應用的功能的簡述,比如View sites on the Internet localestring
Icon 應用程序的圖標位置 iconstring
Exec 應用程序啓動路徑 string
Terminal 應用程序是否在終端運行 boolean
Categories 這個應用程序所屬的類別,可以寫
1. AudioVideo 音視頻
2. Audio 音頻
3. Video 視頻
4. Development 開發
5. Education 教育
6. Game 遊戲
7. Graphics 圖形圖像
8. Network 網絡應用
9. Office 辦公應用
10. Science 科學應用
11. Settings 設置相關
12. System系統應用
可以寫多個,中間用英文分號隔開
string(s)
StartupNotify 是否啓動時通知 boolean

  在Exec這個key的value裏,可以使用一些神奇的字段代碼,部分代碼如下:

字段代碼 含義
%F 表明這個應用程序,可以一次打開多個文件。也表示它會加入到右鍵菜單的打開方式中
%U 表示可以給啓用程序添加啓動時的參數,比如Typora解壓後無法啓動時,可以設置Exec=/opt/typora/bin/Typora-linux-64/Typora %U --no-sandbox

  如果在Ubuntu中,桌面快捷方式不起作用時,可以使用軟連接,如下所示:

# 比如創建idea的軟連接
ln -s /opt/idea/bin/idea.sh /home/xxx/Desktop/ideaIU

  然後就在桌面雙擊ideaIU就可以啓動了。

四、更換軟件源

1、Ubuntu

# 備份/etc/apt/sources.list文件
mv /etc/apt/sources.list /etc/apt/sourses.list.backup
# 編輯source.list文件
sudo vim /etc/apt/sources.list

# 在首行添加新的軟件源,下面的源選一種即可
# ubuntu20.04LTS的源
# 默認註釋了源碼鏡像以提高 apt update 速度,如有需要可自行取消註釋
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

# 編輯後保存,然後執行下面命令,更新源
sudo apt-get update

2、Deepin

# 備份/etc/apt/sources.list文件
mv /etc/apt/sources.list /etc/apt/sourses.list.backup
# 編輯source.list文件
sudo vim /etc/apt/sources.list
# 添加如下內容

## Generated by deepin-installer
deb [by-hash=force] http://mirrors.aliyun.com/deepin lion main contrib non-free
#deb-src http://mirrors.aliyun.com/deepin lion main contrib non-free

# 更新源
sudo apt-get update

五、Ubuntu設置默認應用程序

方式一

  通過打開設置 → 最下面的詳細信息默認應用程序,就可以設置,如下圖:
默認應用程序

方式二

  右鍵一個文件(比如一個.txt文件),單擊右鍵菜單最下方的屬性,在彈出的對話框中就可以設置這種類型的文件的默認打開方式。如下圖所示:
默認應用程序

六、Ubuntu文件瀏覽器樹狀視圖

  引用自博主xia_hu_nao的博文 《設置Ubuntu14.04文件瀏覽器 樹狀視圖 listview》 https://blog.csdn.net/xia_hu_nao/article/details/40087977

  部分內容如下:

sudo apt-get install dconf-tools
啓動 dconf-editor
依次展開 org → gnome → nautilus → list-view
勾選 use-tree-view
這時 文件瀏覽器 就可以樹狀展開了

七、Ubuntu使用Deepin截圖工具

  引用自博主15wylu的博文 《Ubuntu 18.04 一鍵安裝深度截圖工具 Deepin Screenshot》 https://blog.csdn.net/qq_32767041/article/details/84205219

  部分內容如下:

安裝:
打開Ubuntu Software
搜索deepin
點擊Deepin Screenshot
點擊Install
添加快捷鍵:
打開Settings
選擇Devices,選擇Keyboard
滑到底部選擇添加
Name = DeepinScreenShot
Command = /usr/bin/deepin-screenshot
Shortcut = Ctrl + Alt + A

八、Ubuntu常用快捷鍵

  引用自文章 《每位 Ubuntu 18.04 用戶都應該知道的快捷鍵》 https://linux.cn/article-10055-1.html

  部分內容如下:

Super 打開活動界面
Ctrl + Alt + A 打開終端
Super + A 顯示應用程序

九、Ubuntu美化

1、下載主題文件

  主題一般分爲GTK主題、圖標主題和光標主題。主題文件可以從https://www.gnome-look.org下載。

  我們首先下載類似Mac風格的GTK主題和圖標主題,如下圖所示:
主題下載
  得到下載文件:

# GTK主題文件
01-Mojave-dark.tar.xz
05-Mojave-light.tar.xz
# 圖標主題文件
01-McMojave-circle.tar.xz

  然後我們特別爲左利手人士,下載左手光標主題,如下圖所示:
鼠標主題
  得到下載文件:

# 光標主題文件
165053-DMZBlackLH.tgz
165054-DMZWhiteLH.tgz

2、安裝GTK主題

# 進入下載好的主題 所在的目錄
比如 cd [忽略部分目錄]/download/themes
# 把GTK主題文件解壓到/usr/share/themes目錄下
sudo tar -xvJf 01-Mojave-dark.tar.xz -C /usr/share/themes
sudo tar -xvJf 05-Mojave-light.tar.xz -C /usr/share/themes
# 這樣就安裝成功了,配置它,我們稍後再說

3、安裝圖標主題

# 進入下載好的主題 所在的目錄
比如 cd [忽略部分目錄]/download/themes
# 把GTK主題文件解壓到/usr/share/icons目錄下
sudo tar -xvJf 01-McMojave-circle.tar.xz -C /usr/share/icons
# 這樣就安裝成功了,配置它,我們稍後再說

4、安裝光標主題

# 進入下載好的主題 所在的目錄
比如 cd [忽略部分目錄]/download/themes
# 把GTK主題文件解壓到/usr/share/icons目錄下
sudo tar -zxvf 165053-DMZBlackLH.tgz -C /usr/share/icons
sudo tar -zxvf 165054-DMZWhiteLH.tgz -C /usr/share/icons
# 這樣就安裝成功了,配置它,我們稍後再說

5、配置主題

(1) 軟件下載

  在應用商店中先把GNOME tweaksUser Themes下載好。

(2) 開始應用主題

  打開優化(也就是GNOME tweaks),在擴展中保證User Themes已啓用。然後在外觀中對主題做如下圖所示修改:
應用主題  大功告成!

😎PS: 可以在設置通用輔助中設置光標大小。

感謝閱讀~

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章