sudo and su –

Hacker Girl

This is post 9 of 11 in the series “The Linux Command Line” Both sudo and su are highly dangerous. The sudo command is used to run a following command as the super-user. Think “super-user do.” It lets regular users do rootly thing, like: sudo cat /etc/shadow You’ll be prompted for a password: Your Password. …

Linux User Default Files

Hacker Girl

This is post 7 of 11 in the series “The Linux Command Line” When a new user is created, the default files and directories that are created are stored in /etc/skel. This directory can be modified to fit your needs. Modifications will only affect new users; they do not change anything for existing users.

Linux Shells

Glenn Norman

This is post 3 of 11 in the series “The Linux Command Line” Boot, login, and start Secure Telnet/Secure Shell or PuTTY. Log in with your UNM user name and password. Check Your Shell Command: echo $SHELL Your answer may be: /bin/sh # the Bourne shell /bin/csh # the C shell /bin/bash # the Bourne …

Shell Variables

Linux bash shell

This is post 8 of 19 in the series “[ Shell Scripting ]” In Unix there are three kinds of variables: System Variables (you normally can’t change these), Environment Variables (which are yours, and specific to your environment) and Shell Variables (which you declare and use in programming). Bourne, bash and Korn allow you to …

Debugging

Glenn Norman

This is post 6 of 19 in the series “[ Shell Scripting ]” There are several very elementary techniques you can use to debug your scripts. Switch Your Shell to Execute (Debug) Mode Remember the Order of Operations? You can change the mode of the Bourne/bash/Korn shell to show you what your command looks like …

Testing in bash

This is post 3 of 19 in the series “[ Shell Scripting ]” The test Command The command used in most conditionals is the test command. test returns true or false (more accurately, exits with 0 or non-zero status) depending on whether the test is passed or failed. It works like this: test operand1 operator …