Page 1 of 1

FAQ_MA35D1_Show_Current_Directory

Posted: 26 May 2023, 17:46
by yhcheng3
Question :

How to display the current directory in buildroot's rootfs?


Answer.

Modify /etc/profile and add the following definitions:

Code: Select all

HOSTNAME='/bin/hostname'
PS1='[\u@\w]#'
export PS1 HOSTNAME

After restarting, the prompt will be in the following format: [username@current_path]#

Code: Select all

[root@/etc/profile.d]#"




#MA35D1, #rootfs, #buildroot.