Linux Command Line Befehle

Aus eLib.at
Wechseln zu: Navigation, Suche
ELibHilfeAnleitungenportal.png

 

INFORMATION

Details: Siehe Volltext. Sprache der Inhalte: Deutsch.

 

Zitierhilfe: Zitiere diese Inhalte in verschiedenen Zitierstilen. Archivkopien aller Inhalte finden sich auch im großartigen Internet Archive (Spenden).

 

QUERVERBINDUNGEN

Verbindungen mit Personen, Orten, Dingen und Ereignissen finden sich unter Themen und Schwerpunkte.


 

TAGS & KATEGORIEN



Linux Command Line Befehle


System Care

sudo apt-get update Update List of Packages

sudo apt-get upgrade Upgrade OS and packages


Directory Operations

pwd Show current directory

mkdir dir Make directory dir

cd dir Change directory to dir

cd .. Go up a directory

ls List files


ls Options

-a Show all (including hidden)

-R Recursive list

-r Reverse order

-t Sort by last modified

-S Sort by file size

-l Long listing format

-1 One file per line

-m Comma-­sep­arated output

-Q Quoted output


Search Files

grep pattern files Search for pattern in files

grep -i Case insens­itive search

grep -r Recursive search

grep -v Inverted search

grep -o Show matched part of file only

find /dir/ -name name* Find files starting with name in dir

find /dir/ -user name Find files owned by name in dir

find /dir/ -mmin num Find files modifed less than num minutes ago in dir

whereis command Find binary / source / manual for command

locate file Find file (quick search of system index)


Bash Commands

uname -a Show system and kernel

head -n1 /etc/issue Show distri­bution

mount Show mounted filesy­stems

date Show system date

uptime Show uptime

whoami Show your username

man command Show manual for command


Bash Shortcuts

CTRL-c Stop current command

CTRL-z Sleep program

CTRL-a Go to start of line

CTRL-e Go to end of line

CTRL-u Cut from start of line

CTRL-k Cut to end of line

CTRL-r Search history

!! Repeat last command

!abc Run last command starting with abc

!abc:p Print last command starting with abc

!$ Last argument of previous command

ALT-. Last argument of previous command

!* All arguments of previous command

^abc^123 Run previous command, replacing abc with 123


Bash Variables

env Show enviro­nment variables

echo $NAME Output value of $NAME variable

export NAME=value Set $NAME to value

$PATH Executable search path

$HOME Home directory

$SHELL Current shell


Links


.

Endnoten