Basic Bash Commands

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

touch filename

Create an empty file with the specified name.

sudo

DANGER! become super user root DANGER!

vim .bash_profile

Edit the bash profile

cd ..

Go back one dir

cd -

Go to previous dir

cd /

Go to root dir

cd ~ or cd

Go to your home dir

mkdir -p dir1/dir2/dir3

Make intermediate directories as required (make multiple folders at once instead of one at a time)

source .bash_profile

Read the bash profile again (useful after editing because it only reads it once at the beginning of the session)

Bash

The Bourne again shell (Bash) is a common application to offer a shell command line; other common shell applications are the C shell, the Bourne shell, and the Kern shell.

cd

change directory

cp

copy a file or directory

xargs

execute arguments

exit

exit the shell

export

export/set a new environment variable

find

find files

grep

find things inside files

apropos

find what man page is appropriate

ls /dir

list contents of dir, located in the root dir (leading /)

ls

list directory

ls -lR

list directory, long format, recursively through subfolders

env

look at your environment

mkdir

make directory

mv

move a file or directory

hostname

my computer's network name

less

page through a file

popd

pop directory

echo

print some arguments

cat

print the whole file

pwd

print working directory

pushd

push directory

man

read a manual page

rmdir

remove directory


Ensembles d'études connexes

Prothetics, Orthotics. EXAM (POAT)

View Set

Security+ - Chapter 14 - Cryptography

View Set

ALL ABOUT LOGOS, LABELS, PACKAGING

View Set

Chapter 73: Terrorism, Mass Casualty, and Disaster Nursing

View Set

bstrandable NCLEX Respiratory System

View Set