operating system deck 4- Linux commands Flashcards
You need to view the processes running on a Linux system. Which command should you use?
The ps command provides a list of current processes running on the system.
grep
allows you to search for a pattern of text within one or more files. For example, you could find the characters “pwd” in file1.txt, file2.txt and file3.txt by entering the grep pwd file1.txt file2.txt file3.txt command.
apt-get command
allows you to manage packages within Ubuntu.
chmod command
allows you to change permissions on a file. The basic syntax is chmod user=Permission List filename. The user parameter can be u for you, g for the group, or o for other. The permission list parameters include r for read, w for write, x for execute, and - for no access. For example, the chmod u=rwx,g=r-x, o=r– myspecialfile command would give the user read, write and execute access, the group read and execute access, and others read access only.
apt-get
allows you to work with the Advanced Packaging Tool and install packages (applications) in Ubuntu, which is a Debian-based distribution.
cat
displays the contents of one or more files without having to open the file for editing.
cd
changes directory. It is similar to the Windows cd command. For example, the cd / moves you to the root directory, and cd.. moves you to the parent directory.
chmod
changes the permissions on a file. The basic syntax is chmod user=PermissionList filename. The user parameter can be u for you, g for the group, or o for other. The permission list parameters include r for read, w for write, x for execute, and – for no access. For example, the chmod u=rwx,g=r-x, o=r– myspecialfile command would give the user read, write and execute access, the group read and execute access, and other users read access only.
chown
changes the ownership of the file. For example, the chown mrhacker mypassword.txt command would give the mrhacker user ownership of the mypassword.txt file.
cp
copies files and directories.
dd
allows you to copy a file and convert it to another format during the copying process.
df
gets a full summary of available and used disk space of the file system.
dig
queries the Domain Name System for troubleshooting purposes as well as will display the DNS information.
find –locates files based on the user-specified criteria and either prints the pathname for the matched object or can perform actions on the matched object depending on the parameters the user put into place.
grep
finds a pattern of text within a file or group of files. For example, you could find the characters “pwd” in file1.txt, file2.txt and file3.txt by entering the grep pwd file1.txt file2.txt file3.txt command. iwconfig / ifconfig – analogous to the ipconfig command. The ifconfig command is used to view and configure network interfaces. The iwconfig command is similar to the ifconfig command, but is restricted to wireless interfaces.
ls
lists file and directory contents.