You will use these commands to find out and display some informations about your system or about users:

 Linux Command Description

ps

This will show a list with all currently running process (programs). The most often used command is ps -aux

w

This is showing what users are logged on and what they are doing.

id

This command prints your user ID and your group ID’s.

Example: for root the output looks like this: uid=0(root) gid=0(root) groups=0(root)

df

Report filesystem disk space usage. You will use the most the df -h (human readab) command.

du

This is called estimate file space usage and is used for disk usage for folders. du -s is the command that provides a summary for the current directory.

top

This command displays Linux tasks. Displays CPU processes in a full-screen GUI and is  a great way to see the activity on your computer in real-time. To quit you need to type Q.

free

Displays amount of free and used memory in the system.
cat /proc/cpuinfo
Displays information about your CPU.
cat /proc/meminfo
Display lots of information about current memory usage. Like free but with much more details.

uname -a

This command prints system information like kernel version, machine type, hostname, hardware platform, and others. use man uname for more details.

Beginners – Finding Things

Valic —  January 17, 2013 — Leave a comment

The following commands are used to find files.  If you don’t know approximately where they are you need more powerful tools to find files such as these:

Linux Command Description

which

This command shows the full path of shell commands found in your path. For example, if you want to know exactly where the grep command is located on the filesystem, you can type which grep.

The output should be something like: /bin/grep

whereis

Locates the program, source code, and manual page for a command. For example, to find out where ls and its man page are type: whereis ls.

The output will look something like: ls: /bin/ls /usr/share/man/man1/ls.1.gz

locate

A quick way to search for files anywhere on the filesystem. For example, you can find all files and directories that contain the name firefox by typing: locate firefox.

To update the locate database run the following command: updatedb.

find

Find is a very powerful command, but sometimes tricky to use. It can be used to search for files matching certain patterns as well as many other types of searches.
Example: find . -name \*debThis example starts searching in the current directory  and all sub-directories looking for files with deb at the end of their names.

The following commands can be used to:

  • find out information about files
  • display files
  • copy, move or delete files
Linux Command Command Description
file This command shows you out what kind of file it is.

Example:  file /bin/ls will tells you that it is a Linux executable file.

cat Display the contents of a text file on the screen. Example: cat filelist.txt will display the contect of the file filelist.txt
head Display the first 10 lines of a text file. Example: head /var/log/messages This will display the first 10 lines from the messages log file.
tail Display the last 10 lines of a text file. Example:  tail /var/log/messagesThis will display the last 10 lines from the messages log file.
tail -f Display the last 10 lines of a text file and then output appended data as the file grows.

Example: tail -f /var/log/messages

cp Copies a file from one location to another. Example: cp file.txt /tmp
Thos commadn copies the file.txt file to the /tmp directory
mv Moves a file to a new location, or renames it. For example: mv file.txt /tmp
rm Delete a file. Example: rm /tmp/file.txt
mkdir Make Directory. Example: mkdir /tmp/mydirectory
rmdir Remove Directory. Example: rmdir /tmp/mydirectory
NOTE: You can practice these commands by yourself and find more about all commands using the man command.

This is a required exam for LPIC-1 or LPI certification Level 1. It covers basic skills for the Linux professional that are common across all distributions of Linux.

This is a simulation (online LPIC exam) of the LPIC- 101 exam. It uses neither the same questions nor the same weighting of the results as the original exam. But the type and content of the questions should be similar and this may be a good training for the real exam.

The real exam has got about 60 to 70 questions and a time limit of 90 minutes to answer them.

Exam 101: Lpi Test Exam 3

LPIC 101 test 3

NOTE: The questions are not the original questions, but they are similar and may help in preparation         for the test.

This is a required exam for LPIC-1 or LPI certification Level 1. It covers basic skills for the Linux professional that are common across all distributions of Linux.

This is a simulation (online LPIC exam) of the LPIC- 101 exam. It uses neither the same questions nor the same weighting of the results as the original exam. But the type and content of the questions should be similar and this may be a good training for the real exam.

The real exam has got about 60 to 70 questions and a time limit of 90 minutes to answer them.

Exam 101: Lpi Test Exam 2

NOTE: The questions are not the original questions, but they are similar and may help in preparation         for the test.