home
seiten
a-z
<--
hoch
-->
runter
home/cli
Bourne shell syntax. Bourne-compatible shells: sh, bash, zsh and ksh
Befehl | Anmerkung |
---|---|
ls |
ls: ‘list’ |
alias |
|
unalias |
|
pwd |
pwd: ‘print working directory’ |
cd |
cd: ‘change directory’ |
cp |
cp: ‘copy’ |
rm |
rm: ‘remove directory’ |
mv |
mv: ‘move’ |
mkdir |
mkdir: ‘make directory’ |
man |
man: ‘manual’ |
touch |
|
chmod |
chmod: ‘change mode’ |
./ |
./: ‘run program’ |
exit |
|
sudo |
sudo: ‘superuser do’ |
shutdown |
|
htop |
|
unzip |
|
apt |
|
echo |
|
cat |
cat: ‘concatenate’ |
ps |
|
kill |
|
ping |
|
vim |
Open Source Terminal-Texteditor |
history |
|
passwd |
passwd: ‘password’ |
which |
|
shred |
|
less |
|
tail |
|
head |
|
grep |
|
whoami |
whoami: ‘who am i’ |
whatis |
|
wc |
wc: ‘word count’ |
uname |
uname: ‘unix name’ |
neofetch |
|
find |
|
wget |
wget: ‘world wide web get’ Ein Dienstprogramm zum Abrufen von Inhalten aus dem Internet. |
Befehl | Anmerkung |
---|---|
bc |
bc: ‘basic calculator’ Performs floating point math and various other useful calculations that are not practical with basic shell math support. |
expect |
Used to work with hard-to-handle command-line tools that require more complex interaction than is possible with a single pipe. For example, you could use an expect script to interact with getty over a tty or other bidirectional connection to log into a remote computer. In general, scripting that requires two-way interaction between the script and a program is most easily done with an expect script. |
expr |
Evaluates a numerical expression. This command supports basic integer math, and is frequently used for incrementing a loop iterator. |
false |
Returns a failure exit status (nonzero). |
sleep |
Pauses execution for a period of time (measured in seconds). |
true |
Returns a successful exit status (0). |
Befehl | Anmerkung |
---|---|
awk |
Short for Aho, Weinberger, and Kernighan; a programming language in itself, used for text processing using regular expressions. This tool is described further in How AWK-ward. |
grep |
Short for Global [search for] Regular Expressions and Print; prints lines matching an input pattern (optionally with a specified number of lines of leading and/or trailing context). The grep command can take input from standard input or from files.Common variants include agrep (“approximate grep” from the Univ. of AZ), fgrep, and egrep. |
head |
Prints the first few lines from a file (or standard input). The number of lines can be specified with the -n flag. |
perl |
A programming language whose scripts can be easily embedded in shell scripts using the -e flag. Perl’s regular expression language is somewhat richer than basic regular expressions (and easier to read than character classes in extended regular expressions), making it popular for text processing use. |
sed |
Short for stream editor; performs more complex text substitutions using regular expressions. |
sort |
Sorts a series of lines. By default, sort reads these lines from its standard input. After its standard input is closed, it sorts them and prints the results to its standard output. |
tail |
Prints the last few lines from of a file (or standard input). The number of lines can be specified with the -n flag. Alternatively, you can specify the starting position as a byte or line offset from either the start or end of the file. |
tee |
Copies standard input to standard output, saving a copy into a file (or multiple files). |
tr |
Replaces one character with another. |
uniq |
Filters out adjacent lines that match. |
Befehl | Anmerkung |
---|---|
cd |
Changes the current working directory. The command cd .. moves up a directory, for example. |
chflags |
Changes flags on a file or directory. Most of these flags are relatively obscure. For changing permissions flags, use chmod instead. |
chgrp |
Changes the group ID associated with a file or directory. |
chmod |
Changes modes (permission bits) or access control lists (ACLs) on a file or directory. |
chown |
Changes the ownership of files or directories. This command can also change the group if desired. |
find |
Lists or searches for files in a directory and its subdirectories. |
ln |
Creates symbolic links and hard links to files or directories. |
ls |
Lists the files in the current directory. |
mkdir |
Creates new directories. |
mkfifo |
Creates named pipes for communication. This tool is useful in situations where pipes cannot be established while executing the commands, such as connecting two tools in a circular fashion. |
mv |
Moves or renames files and directories. |
rm rmdir |
Removes files and directories |
stat |
Prints detailed file status information, such as the type of file, last modification date, and so on. |
GetFileInfo SetFile |
These tools, installed as part of the Developer Tools installation, are useful for getting and manipulating things like extended attributes.Be aware that if you write a script that depends on these, it will require the Developer Tools to be installed. |
Befehl | Anmerkung |
---|---|
diskutil |
Mounts and unmounts volumes and disks, checks disks for consistency, erases optical disks, wipes disks with a security wipe, partitions disks, manipulates RAID sets, and so on.This utility is the command-line counterpart to the Disk Utility application. |
fsck fsck_msdos fsck_hfs |
Checks a file system for consistency. |
hdiutil |
Creates and manipulates disk images, including attaching disk images for mounting. |
mount umount mount_afp mount_cd9660 mount_cddafs mount_fdesc mount_ftp mount_hfs mount_msdos mount_nfs mount_ntfs mount_smbfs mount_udf mount_url mount_webdav |
Mounts and unmounts volumes.If you unmount automounted volumes behind the back of the disk arbitration system, you can cause strange behavior in the GUI. Use these commands with care, and if you are trying to unmount an automounted volume, use hdiutil or diskutil instead. |
Befehl | Anmerkung |
---|---|
bzip2 bunzip2 bzip2recover |
Compresses and decompresses files using the Burrows-Wheeler block sorting text compression algorithm and Huffman coding. This compression tool takes somewhat longer than other tools such as gzip, but tends to result in smaller files, and is thus growing in popularity for distributing large files.Files created with this tool end with the .bz2 extension. |
compress uncompress |
Compresses and decompresses files using the Lempel-Ziv-Welsh (LZW) compression algorithm. This compression format has largely fallen out of popularity.Files created by this tool end with the .Z extension. |
gzip gunzip zcat gzcat |
Compresses, uncompresses, and prints the contents of files in the GNU Zip (LZ77-based) format. This compression scheme is popular with UNIX and Linux users.While based on the same underlying compression scheme, the GNU Zip and ZIP file formats are not the same. The ZIP file format can contain multiple files, while the Gzip file format can only contain a single file (though this single file may be a tar archive).Files created by this tool end with the .gz extension. |
zip unzip funzip |
Compresses and uncompresses files and directories using the ZIP file format (deflate, based on LZ77 and Huffman coding). This file format is commonly used for exchanging compressed files with Windows users.Files created by this tool end with the .zip extension. |
tar |
Creates, appends to, and extracts multifile archives in the tar (short for “Tape ARchive”) format. This format is the standard format for storing multiple files in a single archive among UNIX and Linux users. The tar file format is usually seen in a compressed form, using either gzip or bzip2.Files created by this tool end with the .tar extension (or the .tgz or .tbz extensions for tar archives compressed with gzip or bzip2). |
cd
chflags
chgrp
chmod
chown
compress
false
find
fsck
fsck_msdos
fsck_hfs
funzip
GetFileInfo
grep
gunzip
gzcat
gzip
mkdir
mkfifo
mount
umount
mount_afp
mount_cd9660
mount_cddafs
mount_fdesc
mount_ftp
mount_hfs
mount_msdos
mount_nfs
mount_ntfs
mount_smbfs
mount_udf
mount_url
mount_webdav
mv
bc
expect
expr
false
sleep
true
awk
grep
head
perl
sed
sort
tail
tee
tr
uniq
cd
chflags
chgrp
chmod
chown
find
ln
ls
mkdir
mkfifo
mv
rm
rmdir
stat
GetFileInfo
SetFile
diskutil
fsck
fsck_msdos
fsck_hfs
hdiutil
mount
umount
mount_afp
mount_cd9660
mount_cddafs
mount_fdesc
mount_ftp
mount_hfs
mount_msdos
mount_nfs
mount_ntfs
mount_smbfs
mount_udf
mount_url
mount_webdav
bzip2
bunzip2
bzip2recover
compress
uncompress
gzip
gunzip
zcat
gzcat
zip
unzip
funzip
tar
alias
apt
cat
cd
chmod
cp
echo
exit
find
grep
head
history
htop
kill
less
ls
man
mkdir
mv
neofetch
passwd
ping
ps
pwd
rm
shred
shutdown
sudo
tail
touch
unalias
uname
unzip
vim
wc
wget
whatis
which
whoami
./
Text …
> alias
run-help=man
which-command=whence
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Text …
Die 40 meist genutzten Linux-Befehle, die du kennen solltest
von Daniel Diaz, 2023
Kommandozeile (Command Line Interface, CLI)
von Peter Loshin, 2022
Shell Scripting Primer
von apple