advertisement

顯示具有 Debian 標籤的文章。 顯示所有文章
顯示具有 Debian 標籤的文章。 顯示所有文章

2021年4月6日

Debian Buster 10 root $PATH in bash does not include /sbin and /usr/sbin

 Debian 10 切換root超級使用者權限,超級使用者/管理者指令找不到,下echo $PATH發現環境變數與一般使用者一樣。

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

$ su
密碼:

# echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games


根據Debian官方說明 Debian 10 su 指令是使用了util-linux套件,其PATH使用預設值且不會警告,若要切換至超級使用者與環境變數,須下達 su - 或 su -l 或 su --login ,三者亦同。

$ su -
密碼:
root@debian10:~# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin


Reference:

https://wiki.debian.org/NewInBuster

https://unix.stackexchange.com/questions/460478/debian-su-and-su-path-differences

 

#ifconfig, #debian 10, #debian buster, #chpasswd, #fdisk, ,#useradd, #lsmod, #command not found, #指令找不到, #命令找不到

 


2019年6月12日

安裝 Nvidia 顯示卡驅動

下載驅動
https://www.nvidia.com/object/unix.html

# bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
# /sbin/shutdown -r now
# service lightdm stop
# chmod +x NVIDIA-Linux-x86_64-390.116.run
# ./NVIDIA-Linux-x86_64-390.116.run

-----Testing-----
$ nvidia-settings

2019年6月3日

Linux 方便簡單的截圖軟體 Imagemagick

安裝
# apt-get install imagemagick

執行
$ import sc1.png
$ import -window root image1.png

若出現
import: unable to open X server `' @ error/import.c/ImportImageCommand/366.
錯誤訊息

請重新開機即可

2019年6月2日

No common CD-ROM drive was detected 解決方式

安裝debian netinst  時出現 "No common CD-ROM drive was detected"

請使用https://rufus.ie/ rufus燒入軟體,將ISO燒製USB,並且選擇 DD Image mode


DD Image mode VS ISO Image mode

https://askubuntu.com/questions/896911/is-dd-image-disk-writing-permanent

2016年12月21日

Docker 安裝在 Windows 快速建置Linux Debian 環境

Host(PC)端安裝先前條件:

  1. Windows 7 64-bit OS 或 Windows 8 / Windows8.1
  2. Virtualization (虛擬化)已開啟
*如果你的作業系統是 Windows 10 請不要參照底下步驟
請參考這裡


OS作業系統請自行確認。

Virtualization 確認方式如下

Windows 8 / Windows8.1:
開啟工作管理員點選 CPU 如下圖

2016年5月28日

Linux fglrx-driver 不支援 ATI AMD 顯示卡 移除方式

# aticonfig: no supported adapters detected

# cat /var/log/Xorg.0.log

$ sudo sh /usr/share/ati/fglrx-uninstall.sh
$ sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev* xorg-driver-fglrx
$ sudo apt-get remove --purge xserver-xorg-video-ati xserver-xorg-video-radeon 
$ sudo apt-get install xserver-xorg-video-ati 
$ sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core 
$ sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
# ln -s /usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1  /usr/lib/libGL.so.1


$ glxinfo
name of display: :0 
Error: couldn't find RGB GLX visual or fbconfig

#reboot
# apt-get install --reinstall xorg


http://ubuntuforums.org/showthread.php?t=952666
https://packages.debian.org/jessie/libglu1-mesa
http://wiki.cchtml.com/index.php/Debian#Removing_Catalyst.2Ffglrx

2016年4月14日

Linux 安裝Qt


下載Qt網址
http://download.qt.io/official_releases/qt/

我下載的是
http://download.qt.io/official_releases/qt/5.4/5.4.1/qt-opensource-linux-x64-android-5.4.1.run

安裝需要套件
編譯需要的一些套件            build-essential(dep:gcc, g++, make等)
Debugger                          gdb
GLX development files       libgl1-mesa-dev
# apt-get install build-essential libgl1-mesa-dev gdb

進入下載目錄
# cd /home/clementyan/Downloads/

更改檔案權限,增加可執行的權限
# chmod +x qt-opensource-linux-x64-android-5.4.1.run

執行安裝程式
# ./qt-opensource-linux-x64-android-5.4.1.run

新增qtcreator連結檔,連結到/opt/Qt5.4.1/Tools/QtCreator/bin/qtcreator
# cd /usr/local/bin/
# ln -s /opt/Qt5.4.1/Tools/QtCreator/bin/qtcreator qtcreator

一般使用者執行qt IDE
$ qtcreator

檢查compiler和gdb是否有抓到


2016年4月13日

Linux 上傳檔案到 Gist GitHub


platform:Debian Jessie x64 PC

安裝gist
# apt-get install gist

登入gist帳密
$ gist-paste --login
Obtaining OAuth2 access_token from github.
GitHub username: clementyan
GitHub password:
Success! https://github.com/settings/applications

檢查
$ ls -la | grep gist
-rw------- 1 clementyan clementyan 40 Apr 13 21:27 .gist

上傳檔案
$ gist-paste linux_kernel_source_tree.txt -f kernel_source_tree.txt -o

說明
-o, --open Open the resulting URL in a browser.
-f, --filename [NAME.EXTENSION] Sets the filename and syntax type.
--login Authenticate gist on this computer.

Ref:gist-paste -h

2016年2月19日

QEMU Installation

QEMU Installation

Step1.檢查是否支援硬體虛擬化

$ grep "vmx" /proc/cpuinfo
如果有輸出表示處理器型態為Intel VT
$ grep "SVM" /proc/cpuinfo
如果有輸出表示處理器型態為AMD-V


如果都沒有輸出表示不支援硬體虛擬化

Step2.檢查Linux kernel KSM是否有開啟

$ grep KSM /boot/config-`uname -r`
CONFIG_KSM=y


沒有請重編Linux kernel

Linux 無線網路設定 安裝

若沒有iwconfig和iwlist指令時,安裝wireless-tools套件
root@tina:~# apt-get install wireless-tools

觀看是否有偵測到無線網路介面
root@tina:~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

由上列結果發現沒有無線網路介面,可能沒有載入驅動模組或沒有安裝驅動程式,我們觀看電腦硬體資訊

linux suspend

# apt-get install pm-utils
正在讀取套件清單... 完成
正在重建相依關係         
正在讀取狀態資料... 完成
下列的額外套件將被安裝:
  ethtool hdparm libx86-1 powermgmt-base vbetool
建議套件:
  apmd cpufrequtils radeontool
下列【新】套件將會被安裝:
  ethtool hdparm libx86-1 pm-utils powermgmt-base vbetool
升級 0 個,新安裝 6 個,移除 0 個,有 0 個未被升級。
需要下載 432 kB 的套件檔。
此操作完成之後,會多佔用 1,157 kB 的磁碟空間。
Do you want to continue? [Y/n]

2012年12月5日

Debian安裝流程

------------關閉i3200錯誤訊息------------

echo "blacklist i3200_edac" >> /etc/modprobe.d/blacklist.conf

------------套件更新與升級----------------

apt-get update;apt-get upgrade

-----------套件安裝(一次安裝)-------------

apt-get install fonts-arphic-bkai00mp fonts-arphic-bsmi00lp fonts-arphic-gbsn00lp fonts-arphic-gkai00mp fonts-arphic-ukai fonts-arphic-uming rxvt-ml gcin vim alsa-base alsa-utils alsamixergui audacious mplayer geeqie xloadimage gimp ntpdate iceweasel-l10n-zh-tw openoffice.org openoffice.org-l10n-zh-tw scim-chewing libcurl3 evince pcmanx-gtk2 -y