歡迎光臨
每天分享高質量文章

我的面試準備過程:ubuntu 使用過程記錄

作者:菟潞寺沙彌

來自:https://segmentfault.com/a/1190000009872809

回到監獄般的實驗室,用一臺4年前的廢電腦,裝一個ubuntu來玩玩吧。

插播一段廣告 頁面下載器(我的Java爬蟲之一) 

https://segmentfault.com/a/1190000011881759Xpath、Jsoup、Xsoup(我的Java爬蟲之二)

https://segmentfault.com/a/1190000011918253

問題1 ubuntu 14.04 –系統的網路服務與此版本的網路管理器不相容問題

  1. 1、sudo -s

  2. 2、cd /etc/NetworkManager/

  3. 3、ls -la

  4. 4、mv system-connections /home//   #移動目錄到自己的使用者目錄下

  5. 5、mkdir /system-connections        

  6. 6、reboot

當然,也可能是!32位的老機器,下載了64位的系統~~

問題2 銳捷上網問題

校園網下載客戶端後,

  1. cd rjsupplicant

  2. sudo ./rjsupplicant.sh -d 0 -u username -p password

此時如果網絡卡消失了

  1. cd /etc/init.d/

  2. sudo start network-manager

問題3 搭建ssh伺服器

  1. sudo apt-get update

  2. sudo apt-get install openssh-server

問題4 vim tab設定為四個空格

vim ~/.vimrc新增以下內容

  1. set ts=4

  2. set expandtab

問題5 安裝java

以安裝 jdk-8u72-linux-x64.tar.gz 為例

  1. #解壓安裝包:

  2. sudo tar -zxvf jdk-8u72-linux-x64.tar.gz

  3. mv jdk1.8.0_72/ /opt/

  4. #配置環境變數:

  5. #編輯配置檔案:

  6. sudo vim /etc/profile

  7. #在該檔案的最尾巴,新增下麵內容:

  8.  JAVA_HOME=/opt/jdk1.8.0_72

  9.  JRE_HOME=$JAVA_HOME/jre

  10.  PATH=$PATH:$JAVA_HOME/bin

  11.  CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

  12.  export JAVA_HOME

  13.  export JRE_HOME

  14.  export PATH

  15.  export CLASSPATH

  16. #執行命令,掃清該配置(必備操作):

  17. . /etc/profile

  18. #檢查是否使用了最新的 JDK:

  19. java -version

安裝maven

下載解壓完後, vi~/.zshrc

  1. export M2_HOME=/opt/software/apache-maven-3.5.0

  2. export M2=$M2_HOME/bin

  3. export PATH=$M2:$PATH

sublime中文輸入問題

解決方法:

  1. #1. 進入sublime text3 外掛管理檔案夾

  2. cd ~/.config/sublime-text-3/Packages

  3. #2. 獲取InputHelper外掛

  4. git clone https://github.com/xgenvn/InputHelper.git

  5. #如果發現在sublime text3 中無法使用ctrl+shift+z調出輸入框,請檢查是否安裝pygtk

  6. sudo apt-get install python-gtk2-dev

grub>

想給實驗室的這臺小電腦挖坑,就保持

  1. linux (hd0,1)/vmlinuz.efi root=/dev/sda3

  2. initrd (hd0,1)/initrd.lz

  3. boot

不然就試試

  1. sudo update-grub

  2. sudo grub-install /dev/sda

好用軟體系列

美觀相關

安裝Albert 和 Casio

  1. sudo add-apt-repository ppa:nilarimogard/webupd8

  2. sudo apt-get update

  3. sudo apt-get install albert

  4. sudo apt-get install cairo-dock

開發者相關

安裝zeal

sudo apt-getinstall zeal

自己從廢舊電腦裡淘到一個i5-3代的cpu,從一堆2G的記憶體裡淘到兩個4G的,現在牛氣哄哄地升級系統,之前真的是,一把心酸淚

升級17.04

配置apt源,校園網,用清華的吧

sudo vi/etc/apt/sources.list

  1. # 預設註釋了原始碼映象以提高 apt update 速度,如有需要可自行取消註釋

  2. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse

  3. # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse

  4. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse

  5. # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse

  6. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse

  7. # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse

  8. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

  9. # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

  10. # 預釋出軟體源,不建議啟用

  11. # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse

  12. # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse

升級!

sudodo-release-upgrade-d

升級17.04後沒有聲音

NVidia

The first step is to make sure that the GPU is not in use by a driver. As you're using the nvidia driver, you must also be using prime.Run prime-select query.If it outputs nvidia, you can disable the driver by running sudo prime-select intel and rebooting.If it outputs unknown then the previous step might also work, but will also break your bumblebee setup.As a sanity check, make sure that the GPU and its audio chip are powered:Login as root: sudo suRun lspci -H1 | grep 01:00. It should output two lines.If the first line ends with (rev ff), you need to power your GPU by running echo ON > /proc/acpi/bbswitch.If the second line is missing, that means that the GPU audio chip is no longer powered. You can try suspending your laptop; resume it again; and check again whether the GPU audio chip is powered (I hope that works for you, otherwise you're out of luck, like me).Run lsmod | grep nvidia again to make sure that the nvidia driver is still not in use.Now that the GPU is powered without a driver we're going to 'remove' it:Run echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove (if the GPU still had a driver loaded/in use, this causes a kernel panic).Redetect the GPU and also its audio chip by running echo 1 > /sys/bus/pci/rescan.Run lspci | grep 01:00.1. If that outputs anything, congratulations! Your linux is now aware of your GPU audio chip.Get X running with the nvidia GPU.Run prime-select. If it outputs intel, run prime-select nvidia.Logout and back in again.If you run aplay -l now it should output the HDMI outputs (on my pc there are 4 outputs, and only 1 works).

https://askubuntu.com/a/660910

安裝系統監控indicator-sysmonitor

  1. sudo add-apt-repository ppa:fossfreedom/indicator-sysmonitor  

  2. sudo apt-get update

  3. sudo apt-get install indicator-sysmonitor

最後在終端執行indicator-sysmonitor &即可

安裝zsh

之前竟然沒有放進來,裝oh my zsh的前提是要裝好了curl以及git

  1. sudo apt-get install curl

  2. sudo apt-get install git

  3. sudo apt-get install zsh

  4. sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

JetBrains IDEA 系列產品通用xx方法(license server)

開啟啟用視窗選擇 Activate new license with License server (用license server 啟用)在 License sever address 處填入 http://xidea.online點選 Activate 進行認證done!


●編號477,輸入編號直達本文

●輸入m獲取文章目錄

推薦↓↓↓

 

Python程式設計

更多推薦18個技術類微信公眾號

涵蓋:程式人生、演演算法與資料結構、駭客技術與網路安全、大資料技術、前端開發、Java、Python、Web開發、安卓開發、iOS開發、C/C++、.NET、Linux、資料庫、運維等。

贊(0)

分享創造快樂

© 2024 知識星球   網站地圖