ALL IN ONE

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/152

encourage image

There's no tags or description

Looks like no tags are added yet.

153 Terms

1
New cards

passwd

Change the current user's password.

2
New cards

sudo -i

Switch to the root account with root's

environment. (Login shell.)

3
New cards

sudo -s

Execute your current shell as root.

(Non-login shell.)

4
New cards

sudo -l

List sudo privileges for the current user

5
New cards

visudo

Edit the sudoers configuration file

6
New cards

getenforce

Display the current SELinux mode

7
New cards

sestatus

Display SELinux details such as the current

SELinux mode

8
New cards

setenforce 0

Change the current SELinux mode to

Permissive. (Does not survive a reboot.)

9
New cards

setenforce 1

Change the current SELinux mode to

Enforcing. (Does not survive a reboot.)

10
New cards

SELINUX=enforcing

Set the SELinux mode to enforcing on boot

by using this setting in the /etc/selinux/config file.

11
New cards

SELINUX=permissive

Set the SELinux mode to permissive on boot

by using this setting in the /etc/selinux/config file.

12
New cards

SELINUX=disabled

Set the SELinux mode to disabled on boot by

using this setting in the /etc/selinux/config file

13
New cards

cd ..

To go up one level of the directory tree. (Change into

the parent directory.)

14
New cards

cd

Go to the $HOME directory

15
New cards

cd /etc

Change to the /etc directory

16
New cards

alias goto='cd /etc/'

Create goto alias for command cd /etc/

17
New cards

yum search keyword

Search for a package by keyword

18
New cards

yum install package

Install package

19
New cards

yum info package

Display description and summary information about package for RHEL based systems

20
New cards

rpm -i package.rpm

Install package from local file named package.rpm

21
New cards

yum remove package

Remove/uninstall package for RHEL based systems

22
New cards

yum update package

Update package with name package for RHEL based systems

23
New cards

tar zxvf sourcecode.tar.gz cd sourcecode ./configure make make install

Install software from source code.

24
New cards

apt-get update

Update package list for Debian based systems.

25
New cards

apt-get upgrade

Upgrade all installed packages to their newest version for Debian based systems

26
New cards

apt-get install package

Install package with name package for Debian based systems

27
New cards

apt-remove package

Remove package with name package for Debian based systems

28
New cards

grep pattern file

# Search for pattern in file

29
New cards

grep -r pattern directory

# Search recursively for pattern in directory

30
New cards

locate name

# Find files and directories by name

31
New cards

find /home/john -name 'prefix*'

# Find files in /home/john that start with "prefix"

32
New cards

find /home -size +100M

# Find files larger than 100MB in /home

33
New cards

whereis program

# Display the location of the binary, source and

manual page files of program

34
New cards

which program

# Display the path of executable that would run if

program is executed

35
New cards

df -h

Show free and used space on mounted filesystems

36
New cards

df -i

Show free and used inodes on mounted filesystems

37
New cards

fdisk -l

Display disks partitions sizes and types

38
New cards

du -ah

Display disk usage for all files and directories in human readable format

39
New cards

du -sh

Display total disk usage off the current directory

40
New cards

du -a directory

Display size of all files in directory

41
New cards

findmnt

List all mounted file systems with details

42
New cards

ssh host

Connect to host as your local username

43
New cards

ssh user@host

Connect to host as user

44
New cards

ssh -p port user@host

Connect to host using port

45
New cards

ssh-keygen

Create a new SSH key pair.

46
New cards

ssh-copy-id user@host

Copy SSH key to the remote host to enable passwordless logins for user

47
New cards

scp file.txt server:/tmp

Secure copy file.txt to the /tmp folder on server

48
New cards

scp server:/var/www/*.html /tmp

Copy *.html files from server to the local

/tmp folder

49
New cards

scp -r server:/var/www /tmp

Copy all files and directories recursively from server to the current system's /tmp folder

50
New cards

rsync -a /home /backups/

Synchronize /home to /backups/home

51
New cards

rsync -avz /home server:/backups/

Synchronize files/directories between the local and remote system with compression enabled

52
New cards

ftp host

Connect to FTP server on the remote host.

53
New cards

chown john /path/to/file

Change ownership of /path/to/file to

john

54
New cards

chgrp sales /path/to/file

Change group ownership of

/path/to/file to group sales

55
New cards

dmesg

Display messages in kernel ring buffer

56
New cards

journalctl

Display logs stored in the systemd

journal

57
New cards

journalctl -u servicename

Display logs for a specific unit (service)

58
New cards

ip a

Display all network interfaces and IP address

59
New cards

ip addr show dev eth0

Display eth0 address and details

60
New cards

ethtool eth0

Query or control network driver and hardware settings

61
New cards

ping host

Send ICMP echo request to host

62
New cards

whois domain

Display whois information for domain

63
New cards

dig domain

Display DNS information for domain

64
New cards

dig -x IP_ADDRESS

Reverse lookup of IP_ADDRESS

65
New cards

host domain

Display DNS IP address for domain

66
New cards

hostname -i

Display the network address of the host name.

67
New cards

hostname -I

Display all local IP addresses of the host.

68
New cards

wget http://domain.com/file

Download http://domain.com/file

69
New cards

netstat -nutlp

Display listening tcp and udp ports and corresponding programs

70
New cards

ifconfig

Display information about network interfaces

71
New cards

traceroute host

Display the path that packets take to host

72
New cards

tcpdump

Capture and analyze network traffic

73
New cards

tar cf archive.tar directory

Create tar named archive.tar containing

directory

74
New cards

tar xf archive.tar

Extract the contents from archive.tar

75
New cards

tar czf archive.tar.gz directory

Create a gzip compressed tar file name archive.tar.gz

76
New cards

tar xzf archive.tar.gz

Extract a gzip compressed tar file

77
New cards

tar cjf archive.tar.bz2 directory

Create a tar file with bzip2 compression

78
New cards

tar xjf archive.tar.bz2

Extract a bzip2 compressed tar file

79
New cards

ls -al

List all files in a long listing (detailed) format

80
New cards

pwd

Display the present working directory

81
New cards

mkdir directory

Create a directory

82
New cards

rm file

Remove (delete) file

83
New cards

rm -r directory

Remove the directory and its contents recursively

84
New cards

rm -f file

Force removal of file without prompting for confirmation

85
New cards

rm -rf directory

Forcefully remove directory recursively

86
New cards

cp file1 file2

Copy file1 to file2

87
New cards

cp -r source_directory destination

Copy source_directory recursively to destination. If destination exists

88
New cards

mv file1 file2

Rename or move file1 to file2. If file2 is an existing directory

89
New cards

ln -s /path/to/file linkname

Create symbolic link to linkname

90
New cards

touch file

Create an empty file or update the access and modification times of file

91
New cards

cat file

View the contents of file

92
New cards

less file

Browse through a text file

93
New cards

head file

Display the first 10 lines of file

94
New cards

tail file

Display the last 10 lines of file

95
New cards

tail -f file

Display the last 10 lines of file and "follow" the file as it grows.

96
New cards

ps

Display currently running processes

97
New cards

ps -ef

Display all currently running processes on the system

98
New cards

ps -ef | grep processname

Display process information for processname

99
New cards

top

Display and manage the top processes

100
New cards

htop

Interactive process viewer (top alternative)