FAQ_MA35D1_Show_Current_Directory

Post Reply
yhcheng3
Posts: 55
Joined: 02 Dec 2022, 10:46

26 May 2023, 17:46

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.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests