1. 設定root密碼

 終端機 --輸入--> sudo passwd root

 

2.查詢指令使用教學

終端機 --輸入-->man 指令

 

3. root身份修改資料夾的權限

所有使用者皆可讀、寫及執行目錄檔案->Terminal --type--> chmod 777 資料夾路徑名稱

以下舉例說明引用自天涯論壇  作者:靈魂頹敗

chmod命令,用於設置檔及資料夾許可權 

讀許可權r       寫許可權w   執行許可權x

 

檔屬主         同組使用者   其他使用者
r w x           r w x           r w x
4 + 2 + 1    4 + 2 + 1     4 + 2 + 1

例如

chmod  777資料夾名稱(賦予資料夾所有使用者讀、寫、執行的許可權)

chmod 444資料夾名稱賦予所有使用者唯讀許可權)

還可以通過使用- R選項連同子目錄下的檔一起設置,例如:
chmod -R 664
資料夾名稱(賦予檔屬主和同組使用者讀、寫許可權,其他使用者唯讀許可權)

資料夾和其子目錄下的檔都被設置了相同的664許可權

 

 

4.apt-get 無法安裝套裝軟體(package)

Terminal-Type-> apt-get update (如果需要請重新開機)

 

5.安裝套件 

*建立主機能使用telnet或ssh連線,需先安裝xinetd telnetd.

Terminal-Type-> apt-get install xinetd telnetd

*建立遠端桌面連線

Terminal-Type-> apt-get install openssh-server

Terminal-Type-> /usr/sbin/sshd

 --------------------------------------------

Steps to change your ubuntu hostname.

1. "sudo vim /etc/hostname"

2. "sudo vim /etc/hosts"

3. reboot ubuntu

4. "echo $HOSTNAME" to verify

-----------------------------------------------------------------------------

If you login ubuntu not as root, you can do this, then sudo command no need password.

 

cd  /etc

sudo  visudo

 

 

(modify this)

 

 

#%admin ALL=(ALL) ALL

%admin ALL=(ALL) NOPASSWD: ALL

 

 

 

<Ctrl>-<O> - save file

> File Name to Write: /etc/sudoers.tmp

(file name must be sudoers)

 

> File exists, OVERWRITE ?

Press <Y>

 

<Ctrl>-<X> - to exit editor

 

 

 

 

 

(then you can check it use sudo -l command)

administrator @ sw-mobile-and-template:/etc$ sudo -l

User administrator may run the following commands on this host:

    (ALL) NOPASSWD: ALL

* NOTE:: You still need to remember your password! Some of OS operation still need it!!

----------------------------------------------

arrow
arrow
    全站熱搜

    lalalah 發表在 痞客邦 留言(1) 人氣()