Help with SSH terminal behavior.
May 30, 2007 12:49 PM
Subscribe
Seeking a better understanding of Linux terminals, mostly being used remotely via SSH. History files, paths, ncurses, etc.
I frequently run into oddities when logged in remotely, but I believe if I understood what was going on, I could fix them. Can you help me understand how these things work, and suggest possible solutions or best-practices?
I use SSH and log in as both root and regular users on various systems. Sometimes I directly log in as root, other times I use su. Why is my PATH not properly set to include various *sbin* directories when I su to root, but it is when I log in directly as root?
Why do ncurses programs look fine when logged in locally, but are full of strange characters when done through SSH? Specifically, I'm talking about ntsysv.
Finally, and most frustratingly, please help me understand history files. When I log in multiple times to the same machine, at the same time, which history file goes with which window? Where are they stored? For example: I log in and execute screen, then run some commands. If I exit screen, the history command doesn't show the commands from the screen session, but rather those I executed immediately before entering screen. Is it possible to consolidate the command history so that it's universal across sessions and screens?
posted by odinsdream to computers & internet (11 comments total)
3 users marked this as a favorite
posted by xmutex at 12:53 PM on May 30, 2007 [1 favorite has favorites]