kali linux 開機輸入密碼無法進入介面__linux

來源:互聯網
上載者:User

遇到開機成功輸入密碼後無法進入案頭(無線迴圈提示輸入密碼)。可能是由於改動/etc/profile導致的,此時可以重新啟動電腦在系統選擇的時候選擇advanced選項進入無介面終端模式。
使用命令

vim /etc/profile

開啟profile檔案將檔案還原為初始狀態(一般的可能是因為添加了export匯入新環境變數)
直接複製一下設定檔覆蓋原配置即可

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).if [ "`id -u`" -eq 0 ]; then  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"else  PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"fiexport PATHif [ "${PS1-}" ]; then  if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then    # The file bash.bashrc already sets the default PS1.    # PS1='\h:\w\$ '    if [ -f /etc/bash.bashrc ]; then      . /etc/bash.bashrc    fi  else    if [ "`id -u`" -eq 0 ]; then      PS1='# '    else      PS1='$ '    fi  fifiif [ -d /etc/profile.d ]; then  for i in /etc/profile.d/*.sh; do    if [ -r $i ]; then      . $i    fi  done  unset ifi

一般linux修改環境變數請在根目錄中的.bashrc檔案中更改

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.