|This page needs cleanup.|
List of commandsEdit
The following is a list of linux commands.
Sudo stands for substitute user do and can be used to execute a single command as root.
for instance to copy a file as root, type:
sudo cp <file> <new file>
File Management Edit
list lists files (and subdirectories) in the provided path name. If no path name is applied, the files of the current directory will be listed instead.
cp <path to file> <path to file in new directory>
mv <path to file> <path to file in new directory>
The rm command is used for removing file(s). Syntax:
chmod <permission model> <file name and path>
Process Management Edit
The killall command kills all PID's with the parameter as their name.
killall <process name>
Package Management Edit
Debian based systems Edit
Use the apt-get command to install packages from remote repositories. Must be run as root.
sudo apt-get <option> <package name>
To install a package use install as parameter, to remove/uninstall a package use remove as parameter. Additional options include:
- apt-get update to update the package list
- apt-get --reinstall install <package name> to reinstall a package
dpkg allows installation of local packages. The most common parameter is -i for installing software. dpkg has to be run as root.
sudo dpkg -i <path to local package>
RPM based systems Edit
grep prints out the lines in a file or standard input that match a specified regular expression
grep "html" sample.html
sed is a command that can perform many line editing operations such as
- search and replace
- line deletion
command that displays files on the screen.
more <filename> or less <filename>
Secure copy is a command that allows you to copy files remotely from another machine.
The whoami command outputs the name of the current user.
The echo command outputs the text used as parameters, IE echo "Hello World!" would output Hello World!
Returns the md5 checksum of <file>
cat is used to return the contents of a file. <file> is the pathname of the file to print the contents of.
cat > file1.txt