bash Linux login file

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat bash Linux login file
# 1  
Old 06-15-2012
bash Linux login file

Hello all new to linux here...

Please help,... when using Pico how can I open and edit the bash Linux login file (stored in your Linux root directory). I would like to add the new commands for items listed below.


a) display contents of a directory => mycd

b) display date and time => mydt

c) logoff => myexit
# 2  
Old 06-15-2012
[homework answers removed]

Last edited by Corona688; 06-15-2012 at 03:58 PM..
# 3  
Old 06-15-2012
Are you asking how to use pico to edit a file?
Are you asking which file to edit?

The "Linux root directory" is "/" and there are no login files there. There are also several kinds of "login files". There is login.defs, bashrc, profile, etc... and they are located in your "home directory" or in "/etc".

Some (ex. files under "/etc") should NOT be edited by a beginner and some (ex. files in your home) are fairly safe to tinker with.

What exactly are you asking here?
Please give a better example of what you are trying to do.

It looks like you want to set "aliases", but for who?
You?
All users?
# 4  
Old 06-15-2012
I want to know what file to edit within pico, this is for an assignment i have to do and im pretty clueless here, here is the proper wording of how it was phrased to me....

use pico to open and edit the bash Linux login file (stored in your Linux root directory). Be careful not to change any of the existing login file commands, and simply add the new commands for items listed for a, b, and c, below to the end of the login file. To test the modified login file, log out and log back in, then use the customized commands.

a) display contents of a directory => mycd
b) display date and time => mydt
c) logoff => myexit
# 5  
Old 06-15-2012
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Initialize file name bash shell - Linux

I am trying to initialize a file name in bash but not having much luck. For example, one of my bash scripts outputs a file named "FILE_1000G.vcf". I would like to rename FILE to match with the user's name. This is my code: set -e echo "Please enter your filename:" read filename rename... (6 Replies)
Discussion started by: Geneanalyst
6 Replies

2. UNIX for Dummies Questions & Answers

Login PID in sh/bash different

In bourne shell the PID generated for the command "ps" matches my login id PID in the command "who -Hu" but in bash/linux the PID generated with the same commands are different . Why so? (2 Replies)
Discussion started by: asd78in
2 Replies

3. Shell Programming and Scripting

login audit bash script

I am a bash beginner and I need to write an script to check my users login time. This has to be in a format of : This script has to work on a server to check all the users. I know that I have to use "last" command but I have no idea how to do it. any assistance is appreciated. Thanks (17 Replies)
Discussion started by: bashily
17 Replies

4. UNIX for Advanced & Expert Users

Different redirection behavior in BASH/Linux when run under cron vice login ???

run_xfs_fsr is a xfs filesystem maintenance script designed to run under cron. The system is a home theater personal computer running mythbuntu 10.10, and is accessed remotely for these tests. cron runs a script, (xfs_fsr.sh) at 02:30 that runs the subject script under BASH and sets the... (3 Replies)
Discussion started by: keepitsimpleeng
3 Replies

5. Shell Programming and Scripting

Bash Login tester Script help!

Hello, first of all, I am a pretty experience c++ programmer, but have never really bothered learning bash scripting at all, so I know conceptually things that can be done in c++, but I'm not too sure about bash. I'm trying to learn Bash, and wanted to start out with a practical application. So I... (1 Reply)
Discussion started by: RSPdev
1 Replies

6. Linux

How to find remote Linux box login account without login in to that box?

Hi, How to find remote Linux box login account without login in to that box? I don't have login account at my remote Linux box. But I need who are all having login account. How do I findout? Thanks, --Muthu. (3 Replies)
Discussion started by: Muthuselvan
3 Replies

7. Shell Programming and Scripting

BASH ssh login

Ok, there's been a good number of posts about this, but here goes. I want a script to log in to a system via ssh without using keys. This will be used to log in to Cisco IOS devices. I have tried the following, but could not get it to work: SSH login expect shell script to supply username and... (1 Reply)
Discussion started by: mike909
1 Replies

8. OS X (Apple)

which file is sourced by bash on login (Mac OS X 10.5.3)?

Hi: So my current Python (2.52) rig is not working as intended. "echo $PATH" in bash gives me 'X'" that's not what i want, so i need to change my path. To do that, there appeared to be four choices (all in my ~/ directory--note: I'm root, it's my Mac, but i'm in a user account): .profile... (2 Replies)
Discussion started by: Alex_Land
2 Replies

9. Shell Programming and Scripting

bash script for ssh login-

hi. I need a bash script which can login to an other mashin via SSH and then run some commands and then return the result to my mashine. I dont know where to begin, I think first I will need a ssh connection, dont know how to make it, then , do I need a ftp connection between the 2 mashins to... (5 Replies)
Discussion started by: big_pil
5 Replies

10. Solaris

How to get bash to be the login shell?

Is there a way to edit a .profile file that would let a user have bash as their login shell? We tried adding: exec /bin/bash --login to the .profile, but this produced an endless loop and we could not login using that account. Thanks! Aaron (8 Replies)
Discussion started by: amheck
8 Replies
Login or Register to Ask a Question